LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 10-31-2005, 02:13 PM   #1
foucault
LQ Newbie
 
Registered: May 2005
Location: Athens, Greece
Distribution: Ubuntu 6.06 "Dapper Drake"
Posts: 25

Rep: Reputation: 15
fstab, umask and users permissions


Good evening everybody,

Out of my two win32 partitions, I want the FAT32 one to be set up as following
-> R W X for owner (root)
-> R W X for group (users)
-> R -- X for others

So, my fstab file looks like below
Code:
/dev/hdb1            /                    ext3       acl,user_xattr        1 1
/dev/hdb2            /home                ext3       acl,user_xattr        1 2
/dev/hda1            /windows/winC        ntfs       defaults              0 0
#hda5 is the one!
/dev/hda5            /windows/winD        vfat       defaults,umask=002    0 0
/dev/hdb3            swap                 swap       pri=42                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
proc                 /proc                proc       defaults              0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
sysfs                /sys                 sysfs      noauto                0 0
/dev/cdrecorder      /media/cdrecorder    subfs      noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/dvd             /media/dvd           subfs      noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0             /media/floppy        subfs      noauto,fs=floppyfss,procuid,nodev,nosuid,sync 0 0
As you can see I've set umask 002 (which really is rwx rwx r-x). However I do not know how to tell fstab that the group that uses the disk is users. I mean that I want hda5 RWX- able for users as well.

hda5 always mounts RWX for root group, not for users. Is there a way that hda5 be RWX for users too? (Yeah there is still is the umask=000 thing, but I want it the right way)

Thnx in advance
 
Old 10-31-2005, 02:28 PM   #2
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
/dev/hda5 /windows/winD vfat defaults,umask=002,gid=users 0 0
should do it.
 
Old 11-01-2005, 09:54 AM   #3
foucault
LQ Newbie
 
Registered: May 2005
Location: Athens, Greece
Distribution: Ubuntu 6.06 "Dapper Drake"
Posts: 25

Original Poster
Rep: Reputation: 15
It did the job!
Thank you.
 
Old 11-03-2005, 01:13 AM   #4
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
Both ntfs and vfat support dmask= & fmask= so you can turn off those annoying execute bits on files. For ntfs, the feature is undocumented on mount(8) but it has been there all the time (see /usr/src/linux/Documentation/filesystems/ntfs.txt). For vfat, the manpage says kernels >= 2.5.43. When I boot into 2.4.28, the additional flags aren't noticed so I don't see errors. You may use them after umask and they'd be ignored in these earlier kernels
 
  


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
Proper umask settings for /etc/fstab? stefanlasiewski Linux - General 6 06-05-2009 06:27 PM
Permissions with umask NullDevice23 Linux - Security 1 11-18-2005 07:27 PM
editing /etc/fstab--for rw permissions for all users koodoo Linux - Newbie 5 03-28-2005 12:37 AM
Umask and Linux Default Permissions Sandoomaphone Linux - Security 9 08-23-2004 04:48 PM
mount network drive fstab/umask? J.Q. Monkey Linux - Newbie 3 02-24-2004 12:49 PM


All times are GMT -5. The time now is 10:07 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