View Full Version : Mount permission Issue (FC9)

24th May 2008, 12:24 PM
hi all :)

just tickering with FC9, and noticed this:

my fstab does contain the following command line

/dev/sdb5 /media/disk2 ntfs rw,user,auto 0 0
/dev/sdc1 /media/disk3 ext2 rw,user,auto 0 0

because both partitions need to be mountable by every user, read/write, and must be auto mounted at startup.

indeed they are automounted, but no operations except "read" can be performed by "user": only root can write and modify. Why?

24th May 2008, 02:10 PM
little update on this weird novel: I tried to manually mount the device, using all the parameters in my knowledge... there is NO WAY to be able to write on that media, no matter which parameter you insert in the "mount" command line :confused:

is this a bug? if it is, it's veeeery annoying.

p.s: in the ntfs mounted media, with the SAME exact parameters, I can do wathever is expected, flawlessly.
It is not an hdd problem, because I verified it and used many times...

any ideas is warmly welcomed :D

24th May 2008, 09:17 PM
Hello LDC,

Refer to this recent thread for some clues on how to modify the fstab entries to allow rull read/write access.

24th May 2008, 10:14 PM
Change the lines to look like this:

/dev/sdb5 /media/disk2 ntfs-3g auto, umask=0000 0 0
/dev/sdc1 /media/disk3 ext2 auto, umask=0000 0 0

Save the file, then run this:

mount -a

That last command will remount everything in fstab. That should get it working; I know, it's done it for me on several versions of Fedora.

25th May 2008, 03:20 AM
I am afraid no one of the two worked for me :(
The most annoying thing is that an NTFS partition is working better than an ext one UNDER LINUX -____-

25th May 2008, 10:54 AM
would formatting it as "extended" rather than "primary" help me somehow? :(

I am in a blind spot, the only way to bypass the problem (not to solve it) is to launch Nautilus as root, then the partition became fully usable...

25th May 2008, 05:22 PM
No extended vs primary won't help at all. The partition is just a container for the FS.

sidebrnz is on the right track. The ntfs-3g supports a safe r/w ntfs. The kernel ntfs version did not the last time I looks (~6 months ago) so do use ntfs-3g.

Your inability to write files is almost certainly due to the file ownership and permissions. You'd have this same problem on the root partition - has nothing (I believe) to do with the mount.

Sidebrnz suggested command "mount -a" won't do anything unless this file system are first unmounted. So try that agains.

*THEN* show us a detailed example of your failure to write. Like this:
[stevea@lycoperdon ~]$ ls -ld /tmp/mp
drwxr-xr-x 2 root root 4096 2008-05-24 06:29 /tmp/mp
[stevea@lycoperdon ~]$ echo "foo" >/tmp/mp/test
-bash: /tmp/mp/test: Permission denied

This behavior is normal and correct. My acct "stevea" does not have write permission in the directory /tmp/mp, so I can't create a file there. I think you have the same issue.

25th May 2008, 05:35 PM
Ugh - after looking closer it seems that fo rthe ntfs and ntfs-3g there is a crude mapping for uid & gid & permissions. Do post what yo uare seeing, but Isee al lfiles and directories with "root root 0777".

25th May 2008, 05:36 PM
mh, right now I am at work so I can't operate on my pc, but I of course already tried to run "mount -a" AFTER umounting all mounted partitions, the results is of course the same.
Despite not having it here, I can clearly remember that I cannot even create directories on that partition (they are "greyed" in the File/create directory menu), but I can open files already present without problems (I wrote them by running Nautilus as root, then I can operate it normally).
I do mount it on /media/disk3 but the disk with NTFS is mounted as well on /media/disk2 without further parameters and it work flawlessly; since I am noob, I wonder why, but maybe this is normal too.
btw, thanks for partecipating in this thread :)

25th May 2008, 06:59 PM
Sidebrnz suggested command "mount -a" won't do anything unless this file system are first unmounted. So try that agains.

That's not the way I understand it. Checking with

man mount

I see this:

mount -a [-t type] [-O optlist]
(usually given in a bootscript) causes all file systems mentioned in
fstab (of the proper type and/or having or not having the proper
options) to be mounted as indicated, except for those whose line con-
tains the noauto keyword. Adding the -F option will make mount fork, so
that the filesystems are mounted simultaneously.

It looks to me as though it remounts everything in fstab except those with noauto and those who's options are wrong. Thus, if you change the options in fstab and run it, you remount the filesystem with the new options right away.

BTW, I suggest editing fstab in something other than vi, that runs in its own window, and running the command with & at the end so as to have your command line active. That way, yo can make your changes, save, try remounting, and if it doesn't work, you still have the file open to correct typos.

25th May 2008, 09:53 PM

this is what I get for trying to write a file on that partition

[LDC@solomon ~]$ cp fedora_aluminium_wp001.jpg /media/disk3
cp: cannot create regular file `/media/disk3/fedora_aluminium_wp001.jpg': Permission denied
[LDC@solomon ~]$

and "ls -ld" give this result:

[LDC@solomon ~]$ ls -ld /media/disk3
drwxr-xr-x 7 root root 4096 2008-05-25 14:02 /media/disk3

25th May 2008, 10:07 PM
Try unmounting the disk with:

umount /media/disk3

then remounting it and see what that does.

25th May 2008, 10:08 PM
Try unmounting the disk with:

umount /media/disk3

then remounting it and see what that does.
this has been done many times without any valuable result :)

26th May 2008, 01:16 AM
Let me see the exact lines for those partitions in fstab. There might be a typo.

26th May 2008, 08:49 AM
Let me see the exact lines for those partitions in fstab. There might be a typo.
they're in the first post of this thread, I changed them back since no one of the alternative did work :)

26th May 2008, 10:24 AM
Just a little point that may not be really relevant but anyway. I am having issues with networking and samba. I have directories in /media that are available on the network . I have not found it possible as yet to have a drive or partition itself fully accessable rw. It is only the directories that I create (ownership and group) under that partition. that are fully rw to others on the network if I set the permissions to allow.
eg Say I have a partition Labelled Photos
/media/Photos not accessable fully only by root
If I create a directory AllPhotos Open terminal as root su - mkddir then chown to me and chgrp to me and permissions can then be altered from my desktop, then
/media/Photos/AllPhotos can be accessable to all I allow .
From what very little l have been able to work out so far fstab does not actually now have the sole mounting role. Gnome desktop has a mounting proceedure, hence all those icons on desktop (easily removed using gconf-editor for ref). So it may be that changes to ownership etc are being blocked because another operation is in control. I have as yet not really worked out what is going on fully just been trying to find work arounds to get get things working for me.

As I say may not be exactly relevant but seems to be related. Another point check selinux I remember reading that developments have introduced new restrictions/rules for different users, giving more options for security. That is one area that I cannot get my head around at the moment, but may be worth a look at if you have selinux enabled.

26th May 2008, 11:09 AM
uhm, I tried right now to use "permissive" mode but seems to have no effect at all.
BTW, as stated above I've found a workaround: just open a terminal, login as root and launch Nautlius.... :)
hope this issue will get somehow fixed in future releases...

26th May 2008, 11:15 AM
I Think stevea got the point.

As your mount point is /media/disk3 (Which I guess, made by you as root) has the right of "rwxr-xr-x
That means only root could write that folder.

Here's two way you can have a try:
1: change the owner/group of /media/disk3 to "user"
2: use suid or guid to control the r/w of that folder.

26th May 2008, 11:53 AM
the method 2 doesn't work ^^;


ext2 is treated in a different way respect NTFS (which works ok just by adding "rw,user" into fstab).

This is the command line that solved the issue:

su -
(enter yourroot password)

#mount /dev/(yourdisk)/ /media/disk3

#cd /media/

[root@solomon media]# chown -R LDC:LDC disk3

it should already be working (the change has a realtime effect), but you can also umount and run "mount -a" to be sure.

thanks to all those that have partecipated in this thread :)

26th May 2008, 07:39 PM
Take out user, as it's redundant. Having auto tells Linux to mount them at boot, and unless you plan to be unmounting and remounting them, there's no need to specify user. Change the options to:


and try again. For some reason, Linux tends to ignore rw, but accepts that umask without blinking.

26th May 2008, 09:13 PM
done. I noticed no changes at all, but I do trust your words :)