LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 02-17-2009, 11:48 AM   #1
moxieman99
Member
 
Registered: Feb 2004
Distribution: Dabble, but latest used are Fedora 13 and Ubuntu 10.4.1
Posts: 413

Rep: Reputation: 82
Why can't Root change partition permissions?


Running Fedora Core 9 (2.6.25 kernel) and have a permissions problem where attempting, as Root, to change permissions fails.

Question is: What can one do to change permissions when even Root is denied ability to change permissions? Here's the situation:

Please bear in mind: Direct edits of /etc/fstab file haven't helped (I know fat doesn't support permissions, but we're talking the mount point, and I need to read and write to the files, and add new ones, in any event)

Hard disk is divided as follows:

Primary partition -- sda1 (ext2) -- /boot

Primary partition -- sda2 (ext3) -- /root

Primary partition -- sda3 (ext3) -- /home

Extended partition -- sda5 (ext3) -- /opt

Extended partition -- sda6 (fat) -- /mnt/data

Extended partition -- sda7 (ext3) -- /tmp

Extended partition -- sda8 (swap) -- swap

The problem is, you guessed, sda6, the /mnt/data partition. I changed (as root) the partition point /mnt to the user's name and group (and even said to change all files and folders to those permissions as well at the time), but the folder /data is permitted solely as root (I think others can access files but that is all). When I log in as root and try to change permissions for the /data I am told that I am not authorized! I'm not talking about doing an su to root in terminal, I am talking about shut-down-power-on-log-in-at-the-beginning-as-root Root, and I can't change permissions for a partition/mount point of my drive? Even when that partition doesn't have the kernel or anything?

When I change the mount point to /opt/data, same thing.

So, under what circumstances will linux refuse to allow Root to change permissions, and how can that be fixed?

Is it my breath?

I hate it when my computer laughs at me.

Moxieman
 
Old 02-17-2009, 12:07 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,395

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
Well when you don't have a posix filesystem, and therefor nowhere for these ownerships to be stored. That's where. you can't do this. instead use suitable options in the mount command / fstab entry. e.g. uid=510,gid=510,umask=000
 
Old 02-17-2009, 12:08 PM   #3
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Try changing your fstab line to
Code:
/dev/sda6 /mnt/data vfat   defaults,umask=000,dmask=000,users       0      0
This should set the files and directories to rwx for all users.
 
Old 02-17-2009, 12:12 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
It doesn't matter what you do to the mount point. Since fat doesn't support permissions at all, the only way to specify the permissions you want is through mount options, and this also includes user and group ownership. I believe fat mounting defaults to root ownership, no matter what the mount point states.

You need to show us what your mount command looks like. I'm guessing you probably need to add or change your umask option, and/or specify a uid/gid.

Also note that permissions on fat partitions are an all-or-nothing thing. There's no way to change the permissions on individual files (although there are separate fmask and dmask options for files and directories, respectively).

Edit: Checked just a few minutes ago and there were no other posts. But when I actually finish what I'm writing and hit save....

Last edited by David the H.; 02-17-2009 at 12:15 PM.
 
Old 02-17-2009, 12:24 PM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Watch the ownership and permissons of a mount point before and after mounting. The permissions after mounting will reflect the permissions of the filesystem (for ext3, reiserfs, etc) or the permissions indicated in the mount command for vfat, ntfs & samba filesystems.
 
Old 02-17-2009, 01:25 PM   #6
moxieman99
Member
 
Registered: Feb 2004
Distribution: Dabble, but latest used are Fedora 13 and Ubuntu 10.4.1
Posts: 413

Original Poster
Rep: Reputation: 82
A heartfelt thank you to all of you. I thought I was modifying my fstab file correctly, but will try again with some of the suggestions you all have made.

Like I originally posted, I knew fat didn't support permissions, but I thought I could make the mount point take 'em.

Thanks again.
 
Old 02-18-2009, 09:38 AM   #7
moxieman99
Member
 
Registered: Feb 2004
Distribution: Dabble, but latest used are Fedora 13 and Ubuntu 10.4.1
Posts: 413

Original Poster
Rep: Reputation: 82
What is keeping your Fstab suggestions from working?

Below is my fstab (Fedora Core 9, 2.6.25-14 kernel). As you can see from the commented out lines, I made some modifications to /etc/fstab -- as root -- and then tried to modify (files and add new files and delete files) the sda6 partition (vfat) mounted at /mnt/data. I have also tried some variations not shown including using the UUID=77D2-9991 identifier in place of /dev/sda6. I even consulted an old printout of my fstab file from when I started using linux (Rehat 9, and it was still supported).

As a user I can use, read and write usb sticks (which are fat) no problem. I cannot access sda6 on my own hard drive.

The set-up generated line allows me as a user to read the partition, but not write or delete.

My uid is 500. I've played with that, both ^ and v, to no avail.

What did I overlook from the suggestions to modify my /etc/fstab (and I still have no idea why linux switched from partition points I could understand, like /dev/hdaX, to this UUID identifier stuff).

WHen booting, boot messages tell me that the lines I tried were bad. Yes, I was commenting out the UUID line when trying the various /dev/sda6 lines and their permutations.

Thanks,

moxieman

UUID=1551b166-3598-47c0-b56c-86b885206643 / ext3 defaults 1 1
UUID=19a835ff-2b6d-4d69-8cc0-d6f26428e0ea /tmp ext3 defaults 1 2
UUID=3cdde18e-05d4-4787-a05a-f3ef89f5799d /opt ext3 defaults 1 2
UUID=77D2-9991 /media/data vfat defaults 1 2
#/dev/sda6 /mnt/data vfat defaults,umask=000,dmask=000 users 0 0
#/dev/sda6 /mnt/data vfat defaults,umask=000,dmask=000 users rw 0 0
#/dev/sda6 /mnt/data vfat defaults,umask=000, users 0 0
#/dev/sda6 /mnt/data vfat auto users,exec,noauto,umask=000 users 0 0
#/dev/sda6 /mnt/data vfat uid=500,gid=500,mode=620 0 0
UUID=624ff640-cd92-4db0-988d-bf0aa058eac3 /home ext3 defaults 1 2
UUID=15f6d4a0-86e7-4495-92a8-fae5ed573d08 /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
UUID=347c0626-753d-4ce8-8733-f22bace65122 swap swap defaults 0 0
 
Old 02-18-2009, 11:19 AM   #8
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Most of the commented out lines have too many columns. The things highlighted in red should really be a part of the comma separated list to the left:
Quote:
Originally Posted by moxieman99 View Post
UUID=1551b166-3598-47c0-b56c-86b885206643 / ext3 defaults 1 1
UUID=19a835ff-2b6d-4d69-8cc0-d6f26428e0ea /tmp ext3 defaults 1 2
UUID=3cdde18e-05d4-4787-a05a-f3ef89f5799d /opt ext3 defaults 1 2
UUID=77D2-9991 /media/data vfat defaults 1 2
#/dev/sda6 /mnt/data vfat defaults,umask=000,dmask=000 users 0 0
#/dev/sda6 /mnt/data vfat defaults,umask=000,dmask=000 users rw 0 0
#/dev/sda6 /mnt/data vfat defaults,umask=000, users 0 0
#/dev/sda6 /mnt/data vfat auto users,exec,noauto,umask=000 users 0 0
#/dev/sda6 /mnt/data vfat uid=500,gid=500,mode=620 0 0
UUID=624ff640-cd92-4db0-988d-bf0aa058eac3 /home ext3 defaults 1 2
UUID=15f6d4a0-86e7-4495-92a8-fae5ed573d08 /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
UUID=347c0626-753d-4ce8-8733-f22bace65122 swap swap defaults 0 0
So one of your lines should probably look like
Code:
#/dev/sda6 /mnt/data vfat   defaults,auto,users,rw,umask=000,dmask=000  0   0
Also, I haven't worked with UUID's before, but the one you've listed for /dev/sda6 seems much shorter than the other UUID's listed. Is it a valid UUID?
 
Old 02-18-2009, 12:11 PM   #9
moxieman99
Member
 
Registered: Feb 2004
Distribution: Dabble, but latest used are Fedora 13 and Ubuntu 10.4.1
Posts: 413

Original Poster
Rep: Reputation: 82
Quote:
Originally Posted by pljvaldez View Post
Most of the commented out lines have too many columns. The things highlighted in red should really be a part of the comma separated list to the left:So one of your lines should probably look like
Code:
#/dev/sda6 /mnt/data vfat   defaults,auto,users,rw,umask=000,dmask=000  0   0
Also, I haven't worked with UUID's before, but the one you've listed for /dev/sda6 seems much shorter than the other UUID's listed. Is it a valid UUID?
THanks, I will try again. I hate tearing my hair out over stupid little oversights.

I noticed the UUID was shorter too, but like I wrote, it mounts for root and root can have its way with the thing. Right now my user can access it (now it also shows up in /usr/local for some strange reason) but cannot write to it.

I'll check back and thanks for your help.
 
Old 02-18-2009, 06:54 PM   #10
moxieman99
Member
 
Registered: Feb 2004
Distribution: Dabble, but latest used are Fedora 13 and Ubuntu 10.4.1
Posts: 413

Original Poster
Rep: Reputation: 82
Quote:
Originally Posted by pljvaldez View Post
Most of the commented out lines have too many columns. The things highlighted in red should really be a part of the comma separated list to the left:So one of your lines should probably look like
Code:
#/dev/sda6 /mnt/data vfat   defaults,auto,users,rw,umask=000,dmask=000  0   0
Also, I haven't worked with UUID's before, but the one you've listed for /dev/sda6 seems much shorter than the other UUID's listed. Is it a valid UUID?
----------------
Your suggestion worked wonderfully. Thanks a million.

Moxieman
 
Old 02-19-2009, 12:45 AM   #11
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Some uuid's can indeed be very short. I also have one on this machine that's only 8 digits long.

BTW, another way to use uuid's in mount/fstab is to use the /dev/disk/by-uuid device shortcuts that udev generally generates for you.
 
Old 02-19-2009, 10:33 AM   #12
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You can run "udevinfo -q env -n /dev/sda6" do discover what the UUID of /dev/sda6 is. A fat filesystem will have a shorter UUID.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot change permissions as root??? Kramer Linux - General 2 08-24-2005 07:31 AM
Can't change the read permissions on an NTFS partition as root? EOHooligan Linux - Newbie 4 01-09-2005 06:48 AM
Root can't change file permissions!!!!!! j_pooria Fedora 1 08-19-2004 03:29 AM
Change my user to root permissions metalaid Linux - Newbie 5 01-19-2004 08:17 PM
Cannot change dir permissions from root sstudley Linux - General 4 02-25-2003 06:52 PM


All times are GMT -5. The time now is 12:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration