View previous topic :: View next topic |
Author |
Message |
shiladitya_biswas n00b
Joined: 26 Apr 2006 Posts: 13
|
Posted: Mon May 08, 2006 5:41 am Post subject: Question on mountin FAT32 |
|
|
Hi,
I have two questions.
1> /dev/hda5 on my hard disk is formatted with W95 FAT 32. Here is how my /etc/fstab looks
/dev/hda5 /mnt/Data vfat users,owner,rw,umask=022,noatime 0 0
Problem is the FAT 32 Filesystem is getting mounted with root permissions and only root can do both read and write. I want all users to have both read and write permissions. Currently users only has read permissions.
Here is how I created the user :
useradd -m -G audio,users,cdrom,games,portage,usb,plugdev,wheel -s /bin/bash sbiswas
passwd sbiswas
2> Second question : I cannot do either reboot or halt from user sbiswas. It says "permission denied". How can I allow sbiswas to issue these commands.
Thanks
Shiladitya |
|
Back to top |
|
|
RlC Guru
Joined: 30 Jul 2005 Posts: 358 Location: austria
|
Posted: Mon May 08, 2006 6:01 am Post subject: |
|
|
1:
options are uid=userid and/or gid=groupid in fstab
2:
you can emerge app-admin/sudo and set an alias for init (or reboot, shutdown and so on) |
|
Back to top |
|
|
runningwithscissors Guru
Joined: 21 Apr 2006 Posts: 454 Location: the third world
|
Posted: Mon May 08, 2006 6:33 am Post subject: Re: Question on mountin FAT32 |
|
|
shiladitya_biswas wrote: |
1> /dev/hda5 on my hard disk is formatted with W95 FAT 32. Here is how my /etc/fstab looks
/dev/hda5 /mnt/Data vfat users,owner,rw,umask=022,noatime 0 0
Problem is the FAT 32 Filesystem is getting mounted with root permissions and only root can do both read and write. I want all users to have both read and write permissions. Currently users only has read permissions.
|
/dev/sda5 /mnt/xpg vfat auto,rw,users,gid=666,dmask=0007,fmask=007 0 0
First of all create a group for users who may access the vfat drive.
The live above is from my fstab for my vfat drive. Substitute the appropriate group id for users who are allowed to access the vfat drive.
shiladitya_biswas wrote: |
2> Second question : I cannot do either reboot or halt from user sbiswas. It says "permission denied". How can I allow sbiswas to issue these commands.
Thanks
Shiladitya |
Again create a group for users who can shut down the machine. Add yourself to that group. Change the group for /sbin/halt to the new group created, and give the users of the group execute permission.
Hope that helps. |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Mon May 08, 2006 5:41 pm Post subject: |
|
|
Moved from Installing Gentoo to Other Things Gentoo.
Not an installation problem, so moved here. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
scvalex Apprentice
Joined: 04 Sep 2005 Posts: 169 Location: Hell
|
Posted: Mon May 08, 2006 5:46 pm Post subject: Non-root user unable to read from fat32 disk |
|
|
Here's an extract from my /etc/fstab.
Code: |
/dev/sda1 /mnt/win_c ntfs user 0 0
/dev/sda5 /mnt/win_i vfat user 0 0
/dev/sda6 /mnt/win_j ntfs user 0 0
|
As a normal user I'm unable to read from any of those disks. As root, there don't seem to be any problems.
What am I doing wrong. _________________ Nothing is what it seems to be. |
|
Back to top |
|
|
runningwithscissors Guru
Joined: 21 Apr 2006 Posts: 454 Location: the third world
|
Posted: Mon May 08, 2006 5:54 pm Post subject: Re: Non-root user unable to read from fat32 disk |
|
|
Right. Do this as root
#groupadd -g 666 windrives
#nano /etc/group
Add yourself (user account) to the list of users in the newly created group.
Then, change the fstab entries to
Quote: |
/dev/sda1 /mnt/win_c ntfs ro,users,gid=666,dmask=0007,fmask=007 0 0
/dev/sda5 /mnt/win_i vfat rw,users,gid=666,dmask=0007,fmask=007 0 0
/dev/sda6 /mnt/win_j ntfs ro,users,gid=666,dmask=0007,fmask=007 0 0
|
Then log out.
Log in as the user you added to the new group.
Then as user mount /mnt/win_c or /mnt/win_i or /mnt/win_j
Access the files from the respective locations. |
|
Back to top |
|
|
dmartinsca Guru
Joined: 09 Dec 2005 Posts: 303 Location: Ontario, Canada
|
Posted: Mon May 08, 2006 6:26 pm Post subject: |
|
|
It's been a while since i've had a windows install on my PC, but i think i used 'users,umask=000' as my fstab options and it allowed everyone to read and write to the partition. This wasn't a security issue for me because i'm the only one who uses the PC. |
|
Back to top |
|
|
scvalex Apprentice
Joined: 04 Sep 2005 Posts: 169 Location: Hell
|
Posted: Mon May 08, 2006 7:14 pm Post subject: |
|
|
Thanks. That solved it.
On the same topic:
Code: |
//Scv003/y /mnt/scv003/y smbfs user,umask=000,password="" 0 0
|
How can I make this filesystem read-write to a normal user. Root can both read and write, but a normal user can only read. _________________ Nothing is what it seems to be. |
|
Back to top |
|
|
dmartinsca Guru
Joined: 09 Dec 2005 Posts: 303 Location: Ontario, Canada
|
Posted: Mon May 08, 2006 7:34 pm Post subject: |
|
|
Check the permissions on /mnt/scv003/y when the samba share is mounted. They may need to be changed using chmod. Permissions on the PC where the share is located could be an issue too... I've never been very good with samba |
|
Back to top |
|
|
runningwithscissors Guru
Joined: 21 Apr 2006 Posts: 454 Location: the third world
|
Posted: Tue May 09, 2006 2:30 am Post subject: |
|
|
One little correction.
Change fmask and dmask on the ntfs entries in fstab to 227 and 0227 respectively, so that you don't give anyone permission to write on those even by accident. |
|
Back to top |
|
|
|