Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question on mountin FAT32
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
shiladitya_biswas
n00b
n00b


Joined: 26 Apr 2006
Posts: 13

PostPosted: Mon May 08, 2006 5:41 am    Post subject: Question on mountin FAT32 Reply with quote

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
View user's profile Send private message
RlC
Guru
Guru


Joined: 30 Jul 2005
Posts: 358
Location: austria

PostPosted: Mon May 08, 2006 6:01 am    Post subject: Reply with quote

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
View user's profile Send private message
runningwithscissors
Guru
Guru


Joined: 21 Apr 2006
Posts: 454
Location: the third world

PostPosted: Mon May 08, 2006 6:33 am    Post subject: Re: Question on mountin FAT32 Reply with quote

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
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Mon May 08, 2006 5:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
scvalex
Apprentice
Apprentice


Joined: 04 Sep 2005
Posts: 169
Location: Hell

PostPosted: Mon May 08, 2006 5:46 pm    Post subject: Non-root user unable to read from fat32 disk Reply with quote

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
View user's profile Send private message
runningwithscissors
Guru
Guru


Joined: 21 Apr 2006
Posts: 454
Location: the third world

PostPosted: Mon May 08, 2006 5:54 pm    Post subject: Re: Non-root user unable to read from fat32 disk Reply with quote

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
View user's profile Send private message
dmartinsca
Guru
Guru


Joined: 09 Dec 2005
Posts: 303
Location: Ontario, Canada

PostPosted: Mon May 08, 2006 6:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
scvalex
Apprentice
Apprentice


Joined: 04 Sep 2005
Posts: 169
Location: Hell

PostPosted: Mon May 08, 2006 7:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
dmartinsca
Guru
Guru


Joined: 09 Dec 2005
Posts: 303
Location: Ontario, Canada

PostPosted: Mon May 08, 2006 7:34 pm    Post subject: Reply with quote

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 :P
Back to top
View user's profile Send private message
runningwithscissors
Guru
Guru


Joined: 21 Apr 2006
Posts: 454
Location: the third world

PostPosted: Tue May 09, 2006 2:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum