Re: [SLUG] Allowing users to write to dos partition.

2000-10-30 Thread James Wilkinson

On Mon, 30 Oct 2000, Michael Lake generated:

Why can't I get Linux to do what I want Monday morning?

Mondayitis?

If I "chown root:dosusers dos" or "chgrp dosusers dos" I
get:
chgrp: dos/: Operation not permitted

DOS filesystems and ownerships are like oil and water.  No, bad analogy,
water and oil are both useful.

Anyway, because you can't store ownerships in the filesystem, chown and
friends die.

1. dosusers is a valid group as /etc/group has:
"dosusers:x:502:root,mikel,lindax"
2. users could, if the permissions were correct, write to it
as etc/fstab has: 
"/dev/hda1  /dos  vfat user,rw 0 0" 

What you want here is a gid=502 or something, check the manpage to
mount, look under the vfat/msdos fs options.  This will mount the fs
under that user, and everything under it will be owned by that user.

This way the ownerships are done at the VFS for the whole fs, and not
inside the fs as chown was trying to do.

-- 
Sure, I subscribe to USENET, but I only get it for the articles.


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] Allowing users to write to dos partition.

2000-10-30 Thread Ken Yap

 This way the ownerships are done at the VFS for the whole fs, and not
 inside the fs as chown was trying to do.

Thanks greatly for this. Although the gid=502 solved the
problem I still had no idea why just changing the
permissions didn't work lie it does on a normal ext2
partition. Now I understand WHY.

The short and long of it is that FAT FS don't have per file ownerships.
The ownerships are "inherited" from the mount options. If you want more
than one user to be able to write to the file, then use Unix groups.


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



[SLUG] Allowing users to write to dos partition.

2000-10-29 Thread Michael Lake

Hi All,

Why can't I get Linux to do what I want Monday morning?

I want users to be able to write to a dos partition .
Permission scurrently, when mounted or unmounted are:
drwxrwxr-x   10 root root  4096 Jan  1  1970 dos

If I "chown root:dosusers dos" or "chgrp dosusers dos" I
get:
chgrp: dos/: Operation not permitted

1. dosusers is a valid group as /etc/group has:
"dosusers:x:502:root,mikel,lindax"
2. users could, if the permissions were correct, write to it
as etc/fstab has: 
"/dev/hda1  /dos  vfat user,rw 0 0" 

hda1 is similarly setup in passwd and shadow like the floppy
which users can write to so why can't I set the permissions
on /dos to allow users to write to it?
root can write to /dos fine of course as it's owned by root.

Mike
-- 

Michael Lake
University of Technology, Sydney
Email: mailto:[EMAIL PROTECTED] Ph: 02 9514 1724 Fx: 02
9514 1628 
URL: http://www.science.uts.edu.au/~michael-lake/
Linux enthusiast, active caver and interested in anything
technical.



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] Allowing users to write to dos partition.

2000-10-29 Thread Terry Collins

Michael Lake wrote:

 I want users to be able to write to a dos partition .
 Permission scurrently, when mounted or unmounted are:
 drwxrwxr-x   10 root root  4096 Jan  1  1970 dos
 
 If I "chown root:dosusers dos" or "chgrp dosusers dos" I
 get:
 chgrp: dos/: Operation not permitted

Redhat?
You need to modify your /etc/fstab to allow the user to mount the
partition and Redhat then allows the user to own and write to it. 'user'
option, I think.

It is something RH thought would be wonderful to have. Hopefully someone
who has time to follow all thier fiddles can explain how to work around
it permanently.




--
   Terry Collins {:-)}}} Ph(02) 4627 2186 Fax(02) 4628 7861  
   email: [EMAIL PROTECTED]  www: http://www.woa.com.au  
   or [EMAIL PROTECTED] 
   WOA Computer Services lan/wan, linux/unix, novell
   snail:  PO Box 1047, Campbelltown, NSW 2560.

 "People without trees are like fish without clean water"


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] Allowing users to write to dos partition.

2000-10-29 Thread Matthew Dalton

Michael Lake wrote:
 I want users to be able to write to a dos partition .
 Permission scurrently, when mounted or unmounted are:
 drwxrwxr-x   10 root root  4096 Jan  1  1970 dos

You can set a general uid and gid for the dos partition with options to
mount. See the mount man page under "Mount options for fat".


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] Allowing users to write to dos partition.

2000-10-29 Thread Michael Lake

Terry Collins wrote:
 
 Michael Lake wrote:
  I want users to be able to write to a dos partition .
  Permission scurrently, when mounted or unmounted are:
  drwxrwxr-x   10 root root  4096 Jan  1  1970 dos
 
  If I "chown root:dosusers dos" or "chgrp dosusers dos" I
  get:
  chgrp: dos/: Operation not permitted
 
 Redhat?
 You need to modify your /etc/fstab to allow the user to mount the
 partition and Redhat then allows the user to own and write to it. 'user'
 option, I think.

But notice that I already have "/dev/hda1  /dos  vfat
user,rw 0 0" in /etc/fstab
 2. users could, if the permissions were correct, write to it
 as etc/fstab has: 
 "/dev/hda1  /dos  vfat user,rw 0 0" 

This option "user" though just allows users to mount /
unmount the device. The partition is automatically mounted
when booting - its the permissions I need to change and
RedHat won't allow me to.

Mike
-- 

Michael Lake
University of Technology, Sydney
Email: mailto:[EMAIL PROTECTED] Ph: 02 9514 1724 Fx: 02
9514 1628 
URL: http://www.science.uts.edu.au/~michael-lake/
Linux enthusiast, active caver and interested in anything
technical.



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] Allowing users to write to dos partition.

2000-10-29 Thread Michael Lake

Matthew Dalton wrote:
 
 Michael Lake wrote:
  I want users to be able to write to a dos partition .
  Permission scurrently, when mounted or unmounted are:
  drwxrwxr-x   10 root root  4096 Jan  1  1970 dos
 
 You can set a general uid and gid for the dos partition with options to
 mount. See the mount man page under "Mount options for fat".

Thats exactly what I needed. 

When mounting if I add the option gid=502 like so...
mount -t vfat -o gid=502 /dev/hda1 /dos

then users can write to the disk as they are members of
dosusers group which has gid=502

Thanks heaps.
Mike
-- 

Michael Lake
University of Technology, Sydney
Email: mailto:[EMAIL PROTECTED] Ph: 02 9514 1724 Fx: 02
9514 1628 
URL: http://www.science.uts.edu.au/~michael-lake/
Linux enthusiast, active caver and interested in anything
technical.



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] Allowing users to write to dos partition.

2000-10-29 Thread Terry Collins

Michael Lake wrote:

 
 This option "user" though just allows users to mount /
 unmount the device. The partition is automatically mounted
 when booting - its the permissions I need to change and
 RedHat won't allow me to.

That is what I was saying. root umount, then user mount it and see if
that changes the permissions. There is a process under Redhat that does
this (automounter?) and it jealously guards the permissions. I had the
same problem with floppies. There is an explantion in the archives, but
I can not think of keywords to give you for search, but I think the
answer came from Ken (fountain of knowledge) Yap.


--
   Terry Collins {:-)}}} Ph(02) 4627 2186 Fax(02) 4628 7861  
   email: [EMAIL PROTECTED]  www: http://www.woa.com.au  
   or [EMAIL PROTECTED] 
   WOA Computer Services lan/wan, linux/unix, novell
   snail:  PO Box 1047, Campbelltown, NSW 2560.

 "People without trees are like fish without clean water"


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] Allowing users to write to dos partition.

2000-10-29 Thread Michael Lake

Terry Collins wrote:
  This option "user" though just allows users to mount /
  unmount the device. The partition is automatically mounted
  when booting - its the permissions I need to change and
  RedHat won't allow me to.
 
 That is what I was saying. root umount, then user mount it and see if
 that changes the permissions. There is a process under Redhat that does
 this (automounter?) and it jealously guards the permissions. I had the
 same problem with floppies. 

If its unmounted and a user mounts it then its fine. The
permissions get set to say mikel:dosusers or lindax:dosusers
so the user can write to it but only that user (this machine
has two users). But it gets mounted at boot time and is
therefore mounted by root and is owned by root and users
don't mount it themselves. Permissions on it didn't change
when it was mounted/unmounted. Perhaps Im missing something
in my understanding here but that gid thingy did the trick.

What I have done now for the other user is to add a symlink
from their netscape mail on the windows partition to
netscape mail on Linux so she can see and modify her windows
mail under Linux. Hopefully that will reduce her need to
reboot.

Mike
-- 

Michael Lake
University of Technology, Sydney
Email: mailto:[EMAIL PROTECTED] Ph: 02 9514 1724 Fx: 02
9514 1628 
URL: http://www.science.uts.edu.au/~michael-lake/
Linux enthusiast, active caver and interested in anything
technical.



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug