LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2004, 07:25 PM   #1
TazG
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Gentoo 2004
Posts: 133

Rep: Reputation: 15
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?
 
Old 05-27-2004, 08:02 PM   #2
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
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
 
Old 05-27-2004, 08:14 PM   #3
jrittvo
Member
 
Registered: Apr 2004
Location: NJ, USA
Distribution: Fedora
Posts: 82

Rep: Reputation: 15
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

Last edited by jrittvo; 05-27-2004 at 08:16 PM.
 
Old 05-27-2004, 08:41 PM   #4
TazG
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Gentoo 2004
Posts: 133

Original Poster
Rep: Reputation: 15
Thank you jrittvo, that's perfect. It's exactly how I want it now.
 
Old 06-11-2004, 12:29 PM   #5
betadan
LQ Newbie
 
Registered: Jun 2004
Location: Canada
Posts: 1

Rep: Reputation: 0
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
 
Old 06-11-2004, 01:25 PM   #6
jrittvo
Member
 
Registered: Apr 2004
Location: NJ, USA
Distribution: Fedora
Posts: 82

Rep: Reputation: 15
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
 
Old 06-25-2004, 02:25 PM   #7
crash75uk
LQ Newbie
 
Registered: Nov 2003
Posts: 18

Rep: Reputation: 0
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
 
Old 06-25-2004, 04:12 PM   #8
jrittvo
Member
 
Registered: Apr 2004
Location: NJ, USA
Distribution: Fedora
Posts: 82

Rep: Reputation: 15
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
 
  


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
windows filesystems vs. linux filesystems irfanhab General 8 05-25-2004 08:21 AM
Setting permissions sammckee Linux - Newbie 9 09-18-2003 06:01 PM
setting permissions Tigger Linux - Security 1 06-09-2003 10:20 AM
Setting Permissions johnnyde Linux - Newbie 1 05-22-2003 05:37 PM
Setting Permissions mythology Slackware 2 12-11-2002 03:14 AM


All times are GMT -5. The time now is 05:49 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration