Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't write to vfat drives except under root?
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
KallDrexx
n00b
n00b


Joined: 20 Apr 2002
Posts: 23

PostPosted: Mon May 06, 2002 11:40 am    Post subject: Can't write to vfat drives except under root? Reply with quote

I can't stand this. I have in my /etc/fstab to mount my windows drive and my 15 gig drive that is used by linux and win2k. Problem is I can NEVER write to thedrive unless under root. I'm trying to run a squid server for myself so I can bypass my school's proxy server but I can't put my cache on my linux drive as it only has > 1gig free. I have tried many things but could not get it to wok. Any help will be appreciated. Here is my fstab

Code:

/dev/hda1               /c              vfat            defaults                0 0
/dev/hdb1               /d              vfat            defaults,user           0 0
/dev/hdb2               /boot           ext3            noauto,noatime          1 1
/dev/hdb3               /               ext3            noatime                 0 0
/dev/hdb5               none            swap            sw                      0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro               0 0
proc                    /proc           proc            defaults                0 0


/d is the drive I really care about writing to as that's my 15gig drive. As you can see I tried using the user option to make the drive writable to others, umount and mounted it again, and it still gave me permission denied.

--KallDrexx
Back to top
View user's profile Send private message
Syntaxis
Guru
Guru


Joined: 28 Apr 2002
Posts: 511
Location: London, UK

PostPosted: Mon May 06, 2002 11:47 am    Post subject: Re: Can't write to vfat drives except under root? Reply with quote

See this thread: https://forums.gentoo.org/viewtopic.php?t=1803&highlight=&sid=848934e039e1e68ac5ebb13f3e6ffbc5
Basically, you have to add the "uid=<number>" or "gid=<number>" mount options to change the user/group ownerships.
For some reason, VFAT file permissions can't be altered after mounting.

Good luck circumventing the cache :-)
Back to top
View user's profile Send private message
KallDrexx
n00b
n00b


Joined: 20 Apr 2002
Posts: 23

PostPosted: Mon May 06, 2002 4:52 pm    Post subject: umm no =P Reply with quote

hehe I created a windrives group (id 666 :twisted: ) and I added kalldrexx and squid to that group, and well.. didn't work (and yes I remounted the drive before I tried)

Code:

/dev/hda1               /c              vfat            gid=666         0 0
/dev/hdb1               /d              vfat            gid=666         0 0
/dev/hdb2               /boot           ext3            noauto,noatime          1 1
/dev/hdb3               /               ext3            noatime                 0 0
/dev/hdb5               none            swap            sw                      0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro               0 0
proc                    /proc           proc            defaults                0 0



that's my new fstab however:
Code:

kalldrexx@localhost d $ rm -rf lilo.txt
rm: cannot unlink `lilo.txt': Permission denied
kalldrexx@localhost d $ groups
kalldrexx bin wheel floppy console audio cdrom ftp games video squid cdrw qmail windrives


--KallDrexx
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Mon May 06, 2002 5:25 pm    Post subject: Re: Can't write to vfat drives except under root? Reply with quote

KallDrexx wrote:
I'm trying to run a squid server for myself so I can bypass my school's proxy


Just as an aside, depending on the particular circumstances, this may prove to be impossible. If your school has things set up correctly (and is, in fact, using a proxy to block people from certain sites) then simply setting up your own proxy will not necessarily allow you to bypass the primary proxy.

Of course, I don't know the whole scenario, so you may have all this covered -- just thought I'd mention it in case it might save you a lot of grief and headache. :)

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
KallDrexx
n00b
n00b


Joined: 20 Apr 2002
Posts: 23

PostPosted: Mon May 06, 2002 5:45 pm    Post subject: bah Reply with quote

I've done it before, before gentoo but i had my cache on my linux drive and it filled up my linux drive in no time. I"m using someone else's proxy right now =D

--KallDrexx
Back to top
View user's profile Send private message
dufnutz
Apprentice
Apprentice


Joined: 01 May 2002
Posts: 209

PostPosted: Mon May 06, 2002 8:23 pm    Post subject: Reply with quote

i have a very similar fstab, and im expiriencing the same problem.... bump for help
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Mon May 06, 2002 8:31 pm    Post subject: Re: umm no =P Reply with quote

KallDrexx wrote:
hehe I created a windrives group (id 666 :twisted: ) and I added kalldrexx and squid to that group, and well.. didn't work (and yes I remounted the drive before I tried)


Did you log out and back in after adding the two user accounts to the windrives group? Linux doesn't dynamically pick up group membership changes -- you only get them when you log in.

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
dufnutz
Apprentice
Apprentice


Joined: 01 May 2002
Posts: 209

PostPosted: Mon May 06, 2002 8:36 pm    Post subject: Reply with quote

yes, i even restarted. and the fstab isn't working
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Mon May 06, 2002 8:39 pm    Post subject: Re: umm no =P Reply with quote

KallDrexx wrote:

Code:

/dev/hda1               /c              vfat            gid=666         0 0



It's been a while since I've dealt with mounting vfat partitions, but I'm fairly sure you have to set a umask variable in your /etc/fstab file. By default (I think) vfat partitions get mounted as rwxr-x-r-x, so you have to change it with a umask. Try changing the above line to:

Code:

/dev/hda1               /c              vfat            gid=666,umask=0000         0 0


Note that sets the drive to world-writeable, so use it with caution. However, if it fixes your problem, then you can refine the umask further to give you the level of permissions you want to actually use for that partition.

hth

--kurt

(and you still have to log out/in to get the permissions in your windrives group :))
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
dufnutz
Apprentice
Apprentice


Joined: 01 May 2002
Posts: 209

PostPosted: Mon May 06, 2002 11:54 pm    Post subject: Reply with quote

thanks that works, now what do those 4 0's mean, i want to change my partition so that it is read only. thanks
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Tue May 07, 2002 12:03 am    Post subject: Reply with quote

dufnutz wrote:
thanks that works, now what do those 4 0's mean, i want to change my partition so that it is read only. thanks


Well, if you don't enter any umask, it should default to read-only except for root, which is read-write. (which is what you want.)

explaning umasks to you is quite an undertaking, however. I recommend you read the following document to get a better understanding. (as well as searching google, which will give you more information)

EDIT: changed link to point to a better document. Searching google is still your best bet for understanding umasks.

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
Gentour
n00b
n00b


Joined: 01 May 2002
Posts: 57

PostPosted: Tue May 07, 2002 1:28 am    Post subject: Reply with quote

add to the options "users" and all the members of group users should be able to mount and write to the drive... at least I think so
if u add "umask=0" to the options all the users should be able to write to the drive.
Back to top
View user's profile Send private message
KallDrexx
n00b
n00b


Joined: 20 Apr 2002
Posts: 23

PostPosted: Tue May 07, 2002 11:31 am    Post subject: woohoo Reply with quote

It works :D

hehe Yes I did relog in after I did it. heh *I haven't replied because I was too busy playing morrowind (which has sadly left me in windows :( ) Either way thanks for your help as it was the umask that worked. Is there special documentation on how to use umask permissions or no?

--KallDrexx
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Tue May 07, 2002 11:57 am    Post subject: Re: woohoo Reply with quote

KallDrexx wrote:
Is there special documentation on how to use umask permissions or no?


umasks are a standard unix permissions thing -- not a Gentoo-specific one. I pointed dufnutz to a few resources above -- you might check those.

Also, for anyone new to *nix in general, you should really have a decent sysadmin book laying around. I use the O'Reilly book, Essential System Administration. You can pick up a used copy from Amazon for under $15 or so. I imagine places like half.com or ebay.com may have even cheaper prices.

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
Senor-D
n00b
n00b


Joined: 09 Aug 2002
Posts: 14

PostPosted: Thu Aug 22, 2002 6:50 am    Post subject: Reply with quote

I posted this in a thread of it's own, because it seemed to be a totally different problem, but I was directed to post it here by a mod. He suggested setting the umask to 0, which I did, (I tried umask=0 before trying umask=0777, maybe I should have mentioned that :/) yet the problem still remains.

If you look at that post, you will see that the permissions appear correct, senor:users owns the file, and has full permissions to said file, and should be able to to anything, but still cannot mv/rm it. I have never seen this before, and posted it on its own because I had already tried what was listed here :/

Thanks for the help
_________________
It is pitch black. You are likely to be eaten by a grue.
Back to top
View user's profile Send private message
H-Dragon
Guru
Guru


Joined: 22 Oct 2002
Posts: 547

PostPosted: Tue Nov 12, 2002 7:00 pm    Post subject: Reply with quote

i just want my normal user "daniel" to be able to use the "mount" command.,.. what group do i have to add him???

or is that not possible... and if not... how do i make it possible?
:P
_________________
WEBSITE
Do not meddle with the affairs of Dragons, for you are crunchy and tasty with ketchup!
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Tue Nov 12, 2002 7:04 pm    Post subject: Reply with quote

H-Dragon wrote:
i just want my normal user "daniel" to be able to use the "mount" command.

man fstab. Look for the 'user' option.

--kurt
_________________
The problem with political jokes is that they get elected
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