[SOLVED] Nemo Permission

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
wiugrad2010

[SOLVED] Nemo Permission

Post by wiugrad2010 »

So I formated a 2nd hard drive via gparted and instantly was unable to read/write to it. I was able to change this with "gksu nemo" and then changing the permissions. No biggy really.

I transferred approx 300 gb to the hard drive. After the transferes completed I noticed I was only given the ability to read the files/folders and each one of them has a "lock" on the folder icon. So i went back to "gksu nemo" and changed the permissions for all of the folders. (keep in mind I have folders within folders). So now I am able to open one of the main 6-8 folders to see its contents. But now I am hit with the fact that I can not "write" to the folders inside the main folders. So I go back to "gksu nemo" and test a few files out by changing the permissions and selecting the "Apply Permissions to Enclosed Files" button before I exit. The new permissions did not get transfered to any of the subfolders/files within the main folders. I then realized... I am going to have to go through every single folder and file to change the permissions.

So after all that.... my question is... Why are the permissions not being changed to the sub contents like it says it will. And how can i make this happen. I have hundreds of files on the 2nd hard drive and I do not have the time to select each individual file to change its permissions.

Please HELP. Thanks in advance.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
nomko

Re: Nemo Permission

Post by nomko »

I found this topic on this forum: http://forums.linuxmint.com/viewtopic.php?f=18&t=110835.

But that 2nd drive, is it an external (USB) driver or internal drive? And, if it is an internal drive, is it added to fstab?
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: Nemo Permission

Post by xenopeek »

Well, that happens. GParted you run as root, so a new file system created with GParted is owned by root. Depending on as which user you copied the files (yourself or root) and on which user owned the files in the first place, yes you may end up coping files that you are allowed to read only. You can probably fix this with a graphical tool, but that's too difficult for me.

I would just put all of these copied files and folders in one folder in your home folder (do NOT put them directly in your home folder, so not in /home/wiugrad2010 for example, but in /home/wiugrad2010/copied_stuff), and then while viewing your home folder in your file manager right-click that one folder 'copied_stuff' and select to open it in a terminal. Then run the following two commands (one at a time) to change ownership back to you and make all files readable and writable for you. It will fix all files and folder recursively.

Code: Select all

sudo chown -Rv $(id -un):$(id -gn) *
chmod -Rv u+rw *
You must however only do this if you have copied personal documents and such. Do not do this if you have copied a home folder from a backup or something similar, as that will contain preference files and similar that may need to be owned instead by a special user, or need special permissions.
Image
wiugrad2010

Re: Nemo Permission

Post by wiugrad2010 »

nomko wrote:I found this topic on this forum: http://forums.linuxmint.com/viewtopic.php?f=18&t=110835.

But that 2nd drive, is it an external (USB) driver or internal drive? And, if it is an internal drive, is it added to fstab?
This is a 2nd internal drive I use for storage. Formated as ext4. Name = "Storage 1"

Does this change what Xeno suggested?

Also, it is not added to fstab that I can tell. I ran cat /etc/fstab

The disk is labeled "Storage 1" and it is /dev/sdb1

how to i add it to fstab? the other topic was specific to him so i dont want to add the wrong data
Last edited by wiugrad2010 on Sun Jan 20, 2013 3:11 pm, edited 2 times in total.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Nemo Permission

Post by altair4 »

wiugrad2010 wrote:
nomko wrote:I found this topic on this forum: http://forums.linuxmint.com/viewtopic.php?f=18&t=110835.

But that 2nd drive, is it an external (USB) driver or internal drive? And, if it is an internal drive, is it added to fstab?
This is a 2nd internal drive I use for storage. Name = "Storage 1"

Does this change what Xeno suggested?
No. The referenced link doesn't apply to you since it's ultimately talking about an NTFS partition which has different rules.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
wiugrad2010

Re: Nemo Permission

Post by wiugrad2010 »

I am trying to add the drive to fstab given the directions from the previous mentioned post but it does not seam to work. I am going to post my results and maybe someone could tell me what i need to put in /etc/fstab. I changed the previous topics info from the drive name, and the ntfs to ext4 but kept everythign else the same. When I run mount -a i get an error saying that line 14 is bad.

Code: Select all

   sudo blkid -c /dev/null
[sudo] password for jason: 
/dev/sda1: UUID="6b2783a1-6c50-4fbc-ab46-844723d26c33" TYPE="ext4" 
/dev/sda5: UUID="01552185-eb53-4bec-a862-219ac00a0a7c" TYPE="swap" 
/dev/sdb1: LABEL="Storage 1" UUID="d3ff75f0-b6f6-cd01-90af-70f0b6f6cd01" TYPE="ext4" 

Code: Select all

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=6b2783a1-6c50-4fbc-ab46-844723d26c33 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=01552185-eb53-4bec-a862-219ac00a0a7c none            swap    sw              0       0

Code: Select all

jason@jason-pc ~ $ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
gvfsd-fuse on /run/user/jason/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=jason)
/dev/sdb1 on /media/jason/Storage 1 type ext4 (rw,nosuid,nodev,uhelper=udisks2)
Fstab looks like this now.

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=6b2783a1-6c50-4fbc-ab46-844723d26c33 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=01552185-eb53-4bec-a862-219ac00a0a7c none            swap    sw              0       0
#Storage 1 /dev/sdb1
UUID=d3ff75f0-b6f6-cd01-90af-70f0b6f6cd01 /media/jason/"Storage 1" ext4 defaults,nls=utf8,umask=000 0 0
My results

Code: Select all

jason@jason-pc ~ $ sudo mount -a
[mntent]: line 14 in /etc/fstab is bad
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: Nemo Permission

Post by xenopeek »

Replace:

Code: Select all

/media/jason/"Storage 1"
With:

Code: Select all

/media/jason/Storage\0401
The \040 is octal number of space, and should work in fstab.
Image
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Nemo Permission

Post by altair4 »

I am trying to add the drive to fstab given the directions from the previous mentioned post but it does not seam to work. I am going to post my results and maybe someone could tell me what i need to put in /etc/fstab. I changed the previous topics info from the drive name, and the ntfs to ext4 but kept everythign else the same. When I run mount -a i get an error saying that line 14 is bad.
Like I said in my previous post the linked thread doesn't apply to you since it deals with NTFS and not ext4. I wrote the line in the linked thread that you are trying to copy and use for your partition. NTFS has different rules so this will not work:
UUID=d3ff75f0-b6f6-cd01-90af-70f0b6f6cd01 /media/jason/"Storage 1" ext4 defaults,nls=utf8,umask=000 0 0
Along with the quotes around "Storage 1" there is no "umask=000" for ext4. Change the line to this:

Code: Select all

UUID=d3ff75f0-b6f6-cd01-90af-70f0b6f6cd01 /media/jason/Storage\0401 ext4 defaults,noatime 0 2
And you will still be left with your original problem: It's still not owned by you so you still have to do a chown after the partition is mounted:

Code: Select all

sudo chown -R jason "/media/jason/Storage 1"
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
wiugrad2010

Re: Nemo Permission

Post by wiugrad2010 »

Thank you very much XENO. I ran the two codes you posted and was able to take ownership. However, instead of moving them to a home_old folder or anything like that, i just opening up nemo, browsed to the 2nd drive and then selected open in terminal. Everything seems to be working properly. It was weird because my networked computers had full access of the drive but the computer the drive is installed on didn't. Just crazy. It is fixed now though so good for that.

Thank you Altair. I was able to add that line to fstab and then run mount -a and everything was fine. Now i just need to learn what the heck fstab really does.

All is well...for now.
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: [SOLVED] Nemo Permission

Post by xenopeek »

Code: Select all

man fstab
:wink:
Image
Locked

Return to “Beginner Questions”