[SOLVED] Nemo Permission

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

[SOLVED] Nemo Permission

Postby wiugrad2010 on Sun Jan 20, 2013 1:51 pm

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 wiugrad2010 on Mon Jan 21, 2013 8:54 am, edited 1 time in total.
wiugrad2010
Level 1
Level 1
 
Posts: 31
Joined: Mon Jan 23, 2012 6:16 pm

Linux Mint is funded by ads and donations.
 

Re: Nemo Permission

Postby nomko on Sun Jan 20, 2013 1:57 pm

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?
ASUS P5KPL-AM SE*Intel Core2 Quad CPU Q8200*4 GiB ram*nVidia GeForce 9500GT*Realtek RTL8101/8102E*Optiarc DVD-RW AD-7200A*HDD:Samsung HD501LJ/HD103SI*Sitecom X5-N600 Router (WLR-5100)

My personal website
User avatar
nomko
Level 9
Level 9
 
Posts: 2524
Joined: Sat Feb 25, 2012 7:28 pm
Location: The Hague, The Netherlands

Re: Nemo Permission

Postby xenopeek on Sun Jan 20, 2013 2:10 pm

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.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14689
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Nemo Permission

Postby wiugrad2010 on Sun Jan 20, 2013 3:06 pm

nomko wrote:I found this topic on this forum: 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.
wiugrad2010
Level 1
Level 1
 
Posts: 31
Joined: Mon Jan 23, 2012 6:16 pm

Re: Nemo Permission

Postby altair4 on Sun Jan 20, 2013 3:09 pm

wiugrad2010 wrote:
nomko wrote:I found this topic on this forum: 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.
altair4
Level 15
Level 15
 
Posts: 5969
Joined: Tue Feb 03, 2009 10:27 am

Re: Nemo Permission

Postby wiugrad2010 on Sun Jan 20, 2013 8:44 pm

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
wiugrad2010
Level 1
Level 1
 
Posts: 31
Joined: Mon Jan 23, 2012 6:16 pm

Re: Nemo Permission

Postby xenopeek on Mon Jan 21, 2013 5:35 am

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.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14689
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Nemo Permission

Postby altair4 on Mon Jan 21, 2013 7:27 am

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.
altair4
Level 15
Level 15
 
Posts: 5969
Joined: Tue Feb 03, 2009 10:27 am

Re: Nemo Permission

Postby wiugrad2010 on Mon Jan 21, 2013 8:53 am

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.
wiugrad2010
Level 1
Level 1
 
Posts: 31
Joined: Mon Jan 23, 2012 6:16 pm

Re: [SOLVED] Nemo Permission

Postby xenopeek on Mon Jan 21, 2013 9:21 am

Code: Select all
man fstab

:wink:
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14689
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], raptir and 33 guests