Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Puzzling simple problem

2 views
Skip to first unread message

Mark Hill

unread,
Nov 29, 2004, 11:21:06 AM11/29/04
to
On 29 Nov 2004 08:02:07 -0800,
Cea...@yahoo.ca <guru...@gmail.com> wrote:

...
> 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

Ivan

unread,
Nov 29, 2004, 11:27:04 AM11/29/04
to
On Mon, 29 Nov 2004 17:11:19 +0100, Mario Berger wrote:

> 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.

Mario Berger

unread,
Nov 29, 2004, 11:11:19 AM11/29/04
to
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

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

guru...@gmail.com

unread,
Nov 29, 2004, 11:02:07 AM11/29/04
to
I am using Slackware 10.0
I have got some problem accessing mounted partitions
In My system
/dev/hda1 WinXp(Fat32)
/dev/hda6 / (ext3)
I am using a common user with
user -- name prasad
group -- grp1.

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

Mario Berger

unread,
Nov 29, 2004, 4:25:05 PM11/29/04
to
Mark Hill wrote:
> /dev/hda1 /mnt/win_c vfat user 0 0

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".

Mario Berger

unread,
Nov 29, 2004, 4:23:38 PM11/29/04
to
Ivan wrote:
> > /dev/hde1 /mnt/windows/C vfat rw,users,uid=1000,gid=100,umask=02710
>
> this should be like this:
> umask=027 1 0

Whow, right, thanks. Yeah, those last two numbers have something to do
with disk initialisation, don't exactly remember that ATM either ;)

Mark Hill

unread,
Nov 29, 2004, 5:29:35 PM11/29/04
to
On Mon, 29 Nov 2004 22:23:38 +0100,
Mario Berger <no_damn...@nospam.no> wrote:
>>
>> this should be like this:
>> umask=027 1 0
>
> 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

guru...@gmail.com

unread,
Nov 30, 2004, 9:27:31 AM11/30/04
to
I got the solution.
Thank you very much.....
Regards
Guruteck
0 new messages