LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting permissions for filesystems (https://www.linuxquestions.org/questions/linux-newbie-8/setting-permissions-for-filesystems-186699/)

TazG 05-27-2004 06:25 PM

Setting permissions for filesystems
 
I'm having trouble setting permissions for the filesystems. I can't get into anything in /mnt as normal user other than CD, DVD, and floppy. I'm in KDE - my NTFS is showing as a "locked folder" and says I don't have permissions to access it. All the other ones say "access denied". In Permissions they all say user=root, group=root. If I try to change user to me, it says I have insufficient access to the file. If I try to change the permissions it says "can't change permissions". Some of them say they use advanced permissions so I click the "advanced permissions" button and change it from there. I don't get an error when I do that but when I go back into it it's set back the way it was before I changed it.
In /etc/fstab the "user" option is enabled for CD, DVD, and floppy, which are the ones I can get into. So I tried setting "user" for all the other ones but then Linux wouldn't start - it would say "can't load /sbin/agetty" over and over and say "c1 spawned too many times" then more of the agetty then "c2 spawned too many times..." until it got to "c6" and then just wouldn't do anything. After I set fstab back the way it was it worked.
Can someone help?

mcd 05-27-2004 07:02 PM

could you post your /etc/fstab please? what do you have in /mnt besides those devices? it would be helpful to know how they are mounted at the moment so we can suggest changes. also, please post the output of

ls -al /mnt

jrittvo 05-27-2004 07:14 PM

The "user" option lets users --mount-- a new CD, DVD or floppy. It doesn't give them --permissions--. They get the permissions because they do the mounting.

With your NTFS, it is already mounted when a user gets to it, so the "user" option does nothing (except maybe it lets a user unmount?). You need to use "umask" to control the permissions. "umask=000" grants rwx to all. But with NTFS, it is dangerous to write from Linux, so you probably want to use the "ro" option too, to have it mounted as read only. The umask=000 and ro end you up with r-xr-xr-x permissions. "root" will still show as owner and group, but you can copy a file off the NTFS drive and the owner and group will change to the user for the copy, if that is important to you. My fstab entry is:

/dev/hdc2 /mnt/Windows ntfs ro,umask=000 0 0

TazG 05-27-2004 07:41 PM

Thank you jrittvo, that's perfect. It's exactly how I want it now.

betadan 06-11-2004 11:29 AM

hi i'm having the same problem i have multiple NTFS partition and when i log into root i can of course access them. Teh only ntfs volume i can access the the windows volume, plz help



This is my "ls -al /mnt"

drwxr-xr-x 8 root root 4096 Jun 11 08:39 ./
drwxr-xr-x 19 root root 4096 Jun 11 08:37 ../
dr-x------ 1 root root 12288 Jun 10 17:07 backups/
drwxr-xr-x 2 root root 4096 Jun 10 05:54 cdrom/
dr-x------ 1 root root 8192 Jun 11 07:50 depot/
drwxrwxrwx 0 root root 0 Jun 11 08:37 floppy/
dr-x------ 1 root root 40960 Jun 10 17:07 music/
dr-xr-xr-x 1 root root 4096 Jun 10 17:07 windows/

and my "fstab"

/dev/hda6 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda7 /home ext3 defaults 1 2
/dev/hdg5 /mnt/backups ntfs ro,umask=000 0 0
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdg1 /mnt/depot ntfs ro,umask=000 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0
/dev/hde1 /mnt/music ntfs ro,umask=000 0 0
/dev/hda1 /mnt/windows ntfs umask=0,nls=iso8859-1,ro 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0

jrittvo 06-11-2004 12:25 PM

If the entry in fstab for the windows volume works the way you want, try using the same entry with the other 3:

/dev/hde1 /mnt/music ntfs umask=0,nls=iso8859-1,ro 0 0
/dev/hdg1 /mnt/depot ntfs umask=0,nls=iso8859-1,ro 0 0
/dev/hdg5 /mnt/backups ntfs umask=0,nls=iso8859-1,ro 0 0

crash75uk 06-25-2004 01:25 PM

I have a similar problem, but am using vfat not ntfs???????

/dev/hda5 swap swap defaults 0 0
/dev/hda3 / ext2 defaults 1 1
/dev/hda6 /windata vfat defaults 1 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

jrittvo 06-25-2004 03:12 PM

See if this will do what you want... Owner will be root, but all will have full read/write/execute rights anyway.

/dev/hda6 /windata vfat rw,umask=000 0 0

You really should make a mount point, though, at /mnt/windata (make that folder) and then use:

/dev/hda6 /mnt/windata vfat rw,umask=000 0 0


All times are GMT -5. The time now is 08:39 PM.