...
> As a root user
...
> mount /dev/hda1 win_c
>
> When I relogin as a prasad.I cant access the folder win_c.It give
> error as permission denied.Problem is before mount the /dev/hda1 the
> owner =prasad ,group=grp1 for win_c.
> But After mounting owner and group changed to root.
The mount command was issued by root, so the mounted partition becomes
owned by root. There are a few ways around this.
One way is to add an entry in /etc/fstab so that a user can mount /mnt/win_c:
/dev/hda1 /mnt/win_c vfat user 0 0
Other ways are mentioned in the a.o.l.s FAQ:
<http://wombat.san-francisco.ca.us/faqomatic/cache/82.html>
--
Mark Hill
> Cea...@yahoo.ca wrote:
>> [user can't properly access mounted win partition]
>
> This is what Iuse and it has always worked perfectly:
>
> /dev/hde1 /mnt/windows/C vfat rw,users,uid=1000,gid=100,umask=02710
this should be like this:
umask=027 1 0
so, umask is 027, and '1 0' are next two fields in fstab
but, if he wants to write as any user, he can just write:
/dev/hde1 /mnt/windows/C vfat rw,users,umask=000 1 0
the dir owner will be the owner of the mount process, and the permissions
777 (-rwxrwxrwx).
BTW, permissions=777-umask
i.
This is what Iuse and it has always worked perfectly:
/dev/hde1 /mnt/windows/C vfat rw,users,uid=1000,gid=100,umask=02710
RW means, obviously, that you can read and write stuff on the partition
(careful with NTFS here!)
Users means that normal users can mount and unmount the partition.
UID is the ID of the user that shall be the owner of the files (you can
find it out by typing "id" on a shell) and gid is the ID of the group
("id" will also tell you).
The Umask, as given here, will make all the files on the partition
appear to have these rights: -rwxr-x---
Google for "umask" to find out how to customize that, it's something
like the "normal" permissions reversed, but I don't remember now.
HTH!
~Mik
--
ls -l /mnt
lrwxrwxrwx 1 root root 9 2004-11-11 17:57 doom -> /dev/null
I want to Access hda1 from user prasad.
As a root user
I created a directory as /mnt/win_c .
chown prasad win_c
chgrp grp1 win_c
mount /dev/hda1 win_c
When I relogin as a prasad.I cant access the folder win_c.It give
error as permission denied.Problem is before mount the /dev/hda1 the
owner =prasad ,group=grp1 for win_c.But After mounting owner and group
changed to root.
I changed owner and group of /dev/hda1 also .. But is in vain..
Please help... I am full puzzle
Thanx in advance
IIRC, using this, you will still have problems such as not being able to
unmount everything as any user. If you want to make sure every user can
also unmount everything, make sure it says "users" and not "user".
Whow, right, thanks. Yeah, those last two numbers have something to do
with disk initialisation, don't exactly remember that ATM either ;)
AIUI, the first number is to earmark the filesystem for use with
dump(8). The second number is for use with 'fsck -A'. man fstab(5) and
fsck(8) have all the details of course. :)
--
Mark Hill