l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
October 7: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2001 Dec 30 17:10

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] vfat partition inaccessible to non-root user
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] vfat partition inaccessible to non-root user



On Sat, 15 Sep 2001, Richard Crawford wrote:
> $ cd /u1
> $ pwd
> /u1
> $ mkdir test
> mkdir: cannot create directory 'test': Permission denied
> $ vi test.txt
> [ Do some stuff to the file ]
> [ Trying to write the file yields, "test.txt" Can't open file for writing ]
> $ cd ..
> $ ls -l
> ....
> drwxr-xr-x	12	root	root	4096	Dec 31 1969	u1
> ....
> 
> u1 is the mount point for /dev/hda6
> 
> $ umount u1
> $ mount /dev/hda6 /u1
> mount: only root can do that
> $ su
> [ password ]
> $ mount /dev/hda6 /u1
> $
> $ su root
> ... password entereed here ...
> [root]$ cd u1
> [root]$ mkdir test
> [root]$ vi test.txt
> [ do some stuff to test.txt ]
> [ writing and saving file as root functions normally ]
> [root]$ su nonroot
> $ mkdir test2
> mkdir: cannot creat directory 'test2': Permission denied
> 
> 
> 
> And so it goes.
> 
> Is there any additional information that I could provide which would help?

Suggestion:
Create, or locate a group in /etc/group that you would like to assign
people to have write access to your vfat partitions.
Add yourself to this group.
look at /etc/fstab and modify your vfat partition mount options like so:

/dev/hda1       /mnt/dosc       vfat defaults,user,exec,dev,suid,sgid,uid=0,gid=80,mode=0775,umask=002  0 0

(Line may be wrapped)
You may want to exp. with the umask line, for when trying to untar, or cp
file attributes from ext2 to vat, it will likely complain with the
umask. (It can probably be removed)

Many of the options are opbvious, but the "special ones" important to the
case include te "uid=0,gid=80,mode=775"

What this does is set owner of all vfat files to be root, (assuming root -
uid0) and group owners to be gid of "80" (which I set on my system to be
group "vfat") and then mode 775 sets all of the filesdirs to be rwxrwxr-x,
thought you could choose 770 if you wanted.

This should allow members of group 80 in /etc/grou to write to and read
from your vfat part, and even mount it if it is not mounted.

Hope this helps,
-ME

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++ 
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ !PGP
t@-(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html
     Systems Department Operating Systems Analyst for the SSU Library


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.