* [gentoo-user] how to access mounted dir with non-root?
@ 2005-08-12 15:33 danielhf
2005-08-12 16:07 ` Uwe Thiem
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: danielhf @ 2005-08-12 15:33 UTC (permalink / raw
To: gentoo-user
i've found that i could not access the mounted
directory with non-root users.
1. i "chown" directories under "/mnt" to the user,
but so long as i mount, the permission of the
specific dir will be changed to "drwx------" and
owner changed to root automatically.
2. i try to use a mount option "users",
$> mount /dev/hda6 /mnt/win -o rw,users
no luck somehow as well.
3. i would not use "sudo" to do this, i believe there is
a way to solve the problem. and not sure "sudo" will work.
any ideas about this? thanks a lot in advance
best regards
daniel
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-12 15:33 [gentoo-user] how to access mounted dir with non-root? danielhf
@ 2005-08-12 16:07 ` Uwe Thiem
2005-08-12 19:18 ` Neil Bothwick
2005-08-12 17:47 ` Stefan Kögl
2005-08-15 6:15 ` Dirk Heinrichs
2 siblings, 1 reply; 14+ messages in thread
From: Uwe Thiem @ 2005-08-12 16:07 UTC (permalink / raw
To: gentoo-user
On 12 August 2005 16:33, danielhf@21cn.com wrote:
> i've found that i could not access the mounted
> directory with non-root users.
> 1. i "chown" directories under "/mnt" to the user,
> but so long as i mount, the permission of the
> specific dir will be changed to "drwx------" and
> owner changed to root automatically.
> 2. i try to use a mount option "users",
> $> mount /dev/hda6 /mnt/win -o rw,users
> no luck somehow as well.
> 3. i would not use "sudo" to do this, i believe there is
> a way to solve the problem. and not sure "sudo" will work.
What filesystem is on hda6? Does it know anything about ownership and
permissions?
If not (like FAT) you need something like "mount -o
uid=youruser,gid=users,umask=0777"
Uwe
--
95% of all programmers rate themselves among the top 5% of all software
developers. - Linus Torvalds
http://www.uwix.iway.na (last updated: 20.06.2004)
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-12 15:33 [gentoo-user] how to access mounted dir with non-root? danielhf
2005-08-12 16:07 ` Uwe Thiem
@ 2005-08-12 17:47 ` Stefan Kögl
2005-08-13 14:22 ` danielhf
2005-08-15 6:15 ` Dirk Heinrichs
2 siblings, 1 reply; 14+ messages in thread
From: Stefan Kögl @ 2005-08-12 17:47 UTC (permalink / raw
To: gentoo-user
danielhf@21cn.com wrote:
> i've found that i could not access the mounted
> directory with non-root users.
> 1. i "chown" directories under "/mnt" to the user,
> but so long as i mount, the permission of the
> specific dir will be changed to "drwx------" and
> owner changed to root automatically.
> 2. i try to use a mount option "users",
> $> mount /dev/hda6 /mnt/win -o rw,users
> no luck somehow as well.
> 3. i would not use "sudo" to do this, i believe there is
> a way to solve the problem. and not sure "sudo" will work.
>
> any ideas about this? thanks a lot in advance
Which filesystem are you talking about? If you mean NTFS (or maybe
others too), you'll have to add a umask to the mount-options.
>
> best regards
> daniel
greetings
>
--
Stefan Kögl | Tel.: +43 664 44 24 894
Apetlonerstraße 11 | Mail: Stefan Kögl <koeglstefan@gmx.at>
A-7132 Frauenkirchen | ICQ: 115578877
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-12 16:07 ` Uwe Thiem
@ 2005-08-12 19:18 ` Neil Bothwick
2005-08-12 19:45 ` Holly Bostick
0 siblings, 1 reply; 14+ messages in thread
From: Neil Bothwick @ 2005-08-12 19:18 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
On Fri, 12 Aug 2005 17:07:32 +0100, Uwe Thiem wrote:
> If not (like FAT) you need something like "mount -o
> uid=youruser,gid=users,umask=0777"
Don't you mean umask=0? umask inverts the bits, so 777 gives --------- to
all files.
--
Neil Bothwick
How do "Do not walk on the grass" signs get there?
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-12 19:18 ` Neil Bothwick
@ 2005-08-12 19:45 ` Holly Bostick
2005-08-12 19:54 ` Ciaran McCreesh
2005-08-12 20:36 ` Neil Bothwick
0 siblings, 2 replies; 14+ messages in thread
From: Holly Bostick @ 2005-08-12 19:45 UTC (permalink / raw
To: gentoo-user
Neil Bothwick schreef:
> On Fri, 12 Aug 2005 17:07:32 +0100, Uwe Thiem wrote:
>
>
>>If not (like FAT) you need something like "mount -o
>>uid=youruser,gid=users,umask=0777"
>
>
> Don't you mean umask=0? umask inverts the bits, so 777 gives --------- to
> all files.
>
>
I'm currently in the middle of an 'argument' with someone else about
this, so explain, please.
If umask masks bits off of the 'default' permissions, then what is the
point of umask=000? It seems that it would leave the permissions as the
default, which appear to be 755 (is there a creation mask of 022
somewhere in the 'default' settings? I can't find it, if so), unless
you've explicitly set them to soemthing else.
The other person says that umask=000 removes all restrictions and gives
all permissions to everybody, but I just don't understand how this
could be, unless the specific file/mount point was already set that way
(no file creation mask, so the files are 'created' with the default
777/666, or inherited the permission structure of the parent).
In any case, I use(d) umask=017 (full permissions for owner, rw for
group, and nothing for anyone else)-- but I had first set the
permissions for the mount point to 750 and mounted vfat partitions using
uid and gid, so that I would be the owner with the full permissions.
Holly
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-12 19:45 ` Holly Bostick
@ 2005-08-12 19:54 ` Ciaran McCreesh
2005-08-12 20:36 ` Neil Bothwick
1 sibling, 0 replies; 14+ messages in thread
From: Ciaran McCreesh @ 2005-08-12 19:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]
On Fri, 12 Aug 2005 21:45:44 +0200 Holly Bostick <motub@planet.nl>
wrote:
| If umask masks bits off of the 'default' permissions, then what is the
| point of umask=000? It seems that it would leave the permissions as
| the default, which appear to be 755 (is there a creation mask of 022
| somewhere in the 'default' settings? I can't find it, if so), unless
| you've explicitly set them to soemthing else.
umask 'masks' the bits. So umask=000 means "use whatever the
application uses when creating things without knocking off any bits".
Most system calls that create files or directories also take a
parameter for mode, which is where the 755 comes from. For example, for
mkdir(2):
> int mkdir(const char *pathname, mode_t mode);
> (...)
> The parameter mode specifies the permissions to use. It is
> modified by the process's umask in the usual way: the permissions of
> the created directory are (mode & ~umask & 0777). Other mode bits
> of the created directory depend on the operating system. For Linux,
> see below.
--
Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron)
Mail : ciaranm at gentoo.org
Web : http://dev.gentoo.org/~ciaranm
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-12 19:45 ` Holly Bostick
2005-08-12 19:54 ` Ciaran McCreesh
@ 2005-08-12 20:36 ` Neil Bothwick
1 sibling, 0 replies; 14+ messages in thread
From: Neil Bothwick @ 2005-08-12 20:36 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]
On Fri, 12 Aug 2005 21:45:44 +0200, Holly Bostick wrote:
> > Don't you mean umask=0? umask inverts the bits, so 777 gives
> > --------- to all files.
> >
> >
>
> I'm currently in the middle of an 'argument' with someone else about
> this, so explain, please.
>
> If umask masks bits off of the 'default' permissions, then what is the
> point of umask=000?
To give rwxrwxrwx, which is fine for a FAT filesystem, and certainly
better than ---------
> It seems that it would leave the permissions as the
> default, which appear to be 755 (is there a creation mask of 022
> somewhere in the 'default' settings?
And there's the rub. Setting permissions to 755 only gives write access
to the owner, which is root when mounting at bootup. The other way of
dealing with this with FAT filesystems is to use the uid/gid options to
set yourself as the user, but that only works on a single user system.
> The other person says that umask=000 removes all restrictions and gives
> all permissions to everybody, but I just don't understand how this
> could be, unless the specific file/mount point was already set that way
> (no file creation mask, so the files are 'created' with the default
> 777/666, or inherited the permission structure of the parent).
The mount point is irrelevant, what counts is the permissions on the
mounted filesystem, not the parent of the mount point. Once you mount
something on it, it takes on the permissions of the mounted device.
# ls -ld t
drwxr-xr-x 2 root root 6 Apr 21 13:34 t
# mount /dev/sdd1 t -o umask=0
# ls -ld t
drwxrwxrwx 7 root root 16384 Jan 1 1970 t
See, the 755 changes to the 777 specified in the mount
options. /dev/sdd1 is a FAT16 formatted flash disk.
--
Neil Bothwick
"We demand rigidly defined areas of doubt and uncertainty!"
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-12 17:47 ` Stefan Kögl
@ 2005-08-13 14:22 ` danielhf
0 siblings, 0 replies; 14+ messages in thread
From: danielhf @ 2005-08-13 14:22 UTC (permalink / raw
To: gentoo-user
On Fri, Aug 12, 2005 at 05:47:22PM +0000, Stefan K?gl wrote:
> danielhf@21cn.com wrote:
> >i've found that i could not access the mounted
> >directory with non-root users.
> >1. i "chown" directories under "/mnt" to the user,
> > but so long as i mount, the permission of the
> > specific dir will be changed to "drwx------" and
> > owner changed to root automatically.
> >2. i try to use a mount option "users",
> > $> mount /dev/hda6 /mnt/win -o rw,users
> > no luck somehow as well.
> >3. i would not use "sudo" to do this, i believe there is
> > a way to solve the problem. and not sure "sudo" will work.
> >
> >any ideas about this? thanks a lot in advance
> Which filesystem are you talking about? If you mean NTFS (or maybe
> others too), you'll have to add a umask to the mount-options.
> >
> >best regards
> >daniel
>
> greetings
> >
>
>
>
> --
> Stefan K?gl | Tel.: +43 664 44 24 894
> Apetlonerstra?e 11 | Mail: Stefan K?gl <koeglstefan@gmx.at>
> A-7132 Frauenkirchen | ICQ: 115578877
>
> --
> gentoo-user@gentoo.org mailing list
>
actually, both ntfs (windows partition) and fat32 (usb disk) have
the problem, i'll try the "umask" option, thanks to all for your
help.
--
daniel
--
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-13 22:59 [gentoo-user] how to access mounted dir with non-root? Michael Swanson
@ 2005-08-13 20:54 ` Neil Bothwick
2005-08-14 3:10 ` danielhf
2005-08-20 2:52 ` [gentoo-user] timeout opening/writing control channel /dev/initctl yance kowara
1 sibling, 1 reply; 14+ messages in thread
From: Neil Bothwick @ 2005-08-13 20:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
On Sat, 13 Aug 2005 17:59:25 -0500, Michael Swanson wrote:
> Is this technique of umask=0 safe to use on an NTFS volume? I want to
> mount an NTFS drive on my desktop so that a regular user can access it.
> Is there a similar way to mount it with only read permissions,
> seeing as writing to NTFS drives isn't usually a particularly good idea
> with Linux.
NTFS partitions are usually mounted with the ro option (read only) so it
doesn't matter what write permissions you set. But to be certain, you
could set umask=222.
--
Neil Bothwick
"Bother," said Pooh, as he pulled the alien face-hugger off.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
@ 2005-08-13 22:59 Michael Swanson
2005-08-13 20:54 ` Neil Bothwick
2005-08-20 2:52 ` [gentoo-user] timeout opening/writing control channel /dev/initctl yance kowara
0 siblings, 2 replies; 14+ messages in thread
From: Michael Swanson @ 2005-08-13 22:59 UTC (permalink / raw
To: gentoo-user
Is this technique of umask=0 safe to use on an NTFS volume? I want to
mount an NTFS drive on my desktop so that a regular user can access it.
Is there a similar way to mount it with only read permissions,
seeing as writing to NTFS drives isn't usually a particularly good idea
with Linux.
Thanks,
Mike Swanson
rearden@atlantisvalley.com
On Fri, 12 Aug 2005 21:45:44 +0200, Holly Bostick wrote:
>>> > Don't you mean umask=0? umask inverts the bits, so 777 gives
>>> > --------- to all files.
>>> >
>>> >
>
>>
>> I'm currently in the middle of an 'argument' with someone else about
>> this, so explain, please.
>>
>> If umask masks bits off of the 'default' permissions, then what is the
>> point of umask=000?
To give rwxrwxrwx, which is fine for a FAT filesystem, and certainly
better than ---------
>> It seems that it would leave the permissions as the
>> default, which appear to be 755 (is there a creation mask of 022
>> somewhere in the 'default' settings?
And there's the rub. Setting permissions to 755 only gives write access
to the owner, which is root when mounting at bootup. The other way of
dealing with this with FAT filesystems is to use the uid/gid options to
set yourself as the user, but that only works on a single user system.
>> The other person says that umask=000 removes all restrictions and gives
>> all permissions to everybody, but I just don't understand how this
>> could be, unless the specific file/mount point was already set that way
>> (no file creation mask, so the files are 'created' with the default
>> 777/666, or inherited the permission structure of the parent).
The mount point is irrelevant, what counts is the permissions on the
mounted filesystem, not the parent of the mount point. Once you mount
something on it, it takes on the permissions of the mounted device.
# ls -ld t
drwxr-xr-x 2 root root 6 Apr 21 13:34 t
# mount /dev/sdd1 t -o umask=0
# ls -ld t
drwxrwxrwx 7 root root 16384 Jan 1 1970 t
See, the 755 changes to the 777 specified in the mount
options. /dev/sdd1 is a FAT16 formatted flash disk.
-- Neil Bothwick "We demand rigidly defined areas of doubt and
uncertainty!"
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-13 20:54 ` Neil Bothwick
@ 2005-08-14 3:10 ` danielhf
0 siblings, 0 replies; 14+ messages in thread
From: danielhf @ 2005-08-14 3:10 UTC (permalink / raw
To: gentoo-user
On Sat, Aug 13, 2005 at 09:54:22PM +0100, Neil Bothwick wrote:
> On Sat, 13 Aug 2005 17:59:25 -0500, Michael Swanson wrote:
>
> > Is this technique of umask=0 safe to use on an NTFS volume? I want to
> > mount an NTFS drive on my desktop so that a regular user can access it.
> > Is there a similar way to mount it with only read permissions,
> > seeing as writing to NTFS drives isn't usually a particularly good idea
> > with Linux.
>
> NTFS partitions are usually mounted with the ro option (read only) so it
> doesn't matter what write permissions you set. But to be certain, you
> could set umask=222.
>
>
> --
> Neil Bothwick
>
> "Bother," said Pooh, as he pulled the alien face-hugger off.
thanks again. i use "umask=022" that solved the problem perfectly.
just write down the permission you want, eg. 755, then 777 minus
755, the result is right the value for the "umask".
hope it's a useful tip for beginners like me :-)
best regards
daniel
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
2005-08-12 15:33 [gentoo-user] how to access mounted dir with non-root? danielhf
2005-08-12 16:07 ` Uwe Thiem
2005-08-12 17:47 ` Stefan Kögl
@ 2005-08-15 6:15 ` Dirk Heinrichs
2 siblings, 0 replies; 14+ messages in thread
From: Dirk Heinrichs @ 2005-08-15 6:15 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]
Am Freitag, 12. August 2005 17:33 schrieb ext
gentoo-user+bounces-18312-ext-dirk.heinrichs=nokia.com@gentoo.org:
> i've found that i could not access the mounted
> directory with non-root users.
> 1. i "chown" directories under "/mnt" to the user,
> but so long as i mount, the permission of the
> specific dir will be changed to "drwx------" and
> owner changed to root automatically.
Yes, of course. After mounting, the directory has the permissions of the
_mounted_ filesystem, so you need to chown/chmod afterwards. However, that
only works with filesystems that know about unix permission.
> 2. i try to use a mount option "users",
> $> mount /dev/hda6 /mnt/win -o rw,users
I guess you're trying to mount some Windows filesystem. See above, they
don't know unix permissions.
You have to use the uid option when mounting, see "man mount" for details.
HTH...
Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Hambornerstraße 55 | Web: http://www.capgemini.com
D-40472 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [gentoo-user] timeout opening/writing control channel /dev/initctl
2005-08-13 22:59 [gentoo-user] how to access mounted dir with non-root? Michael Swanson
2005-08-13 20:54 ` Neil Bothwick
@ 2005-08-20 2:52 ` yance kowara
2005-08-22 12:38 ` yance kowara
1 sibling, 1 reply; 14+ messages in thread
From: yance kowara @ 2005-08-20 2:52 UTC (permalink / raw
To: gentoo-user
Hi all,
I am trying to install gentoo stage 3 using kernel 2.6.12-gentoo-r6,
following the documentation.
after #umount /mnt/gentoo ... (Chapter 10.d. Rebooting the system)
#reboot
The following messages are displayed:
shutdown: timeout opening/writing control channel /dev/initctl
init: timeout opening/writing control channel /dev/initctl
Any pointer on how to tackle this prob?
Thanks heaps for any pointers.
Regards,
Yance
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] timeout opening/writing control channel /dev/initctl
2005-08-20 2:52 ` [gentoo-user] timeout opening/writing control channel /dev/initctl yance kowara
@ 2005-08-22 12:38 ` yance kowara
0 siblings, 0 replies; 14+ messages in thread
From: yance kowara @ 2005-08-22 12:38 UTC (permalink / raw
To: gentoo-user
yance kowara wrote:
> Hi all,
>
> I am trying to install gentoo stage 3 using kernel 2.6.12-gentoo-r6,
> following the documentation.
>
> after #umount /mnt/gentoo ... (Chapter 10.d. Rebooting the system)
> #reboot
>
> The following messages are displayed:
> shutdown: timeout opening/writing control channel /dev/initctl
> init: timeout opening/writing control channel /dev/initctl
>
> Any pointer on how to tackle this prob?
>
> Thanks heaps for any pointers.
>
> Regards,
>
> Yance
It appears that I have to type exit twice before reboot. It is only one
"exit" in docs.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-08-22 12:45 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-13 22:59 [gentoo-user] how to access mounted dir with non-root? Michael Swanson
2005-08-13 20:54 ` Neil Bothwick
2005-08-14 3:10 ` danielhf
2005-08-20 2:52 ` [gentoo-user] timeout opening/writing control channel /dev/initctl yance kowara
2005-08-22 12:38 ` yance kowara
-- strict thread matches above, loose matches on Subject: below --
2005-08-12 15:33 [gentoo-user] how to access mounted dir with non-root? danielhf
2005-08-12 16:07 ` Uwe Thiem
2005-08-12 19:18 ` Neil Bothwick
2005-08-12 19:45 ` Holly Bostick
2005-08-12 19:54 ` Ciaran McCreesh
2005-08-12 20:36 ` Neil Bothwick
2005-08-12 17:47 ` Stefan Kögl
2005-08-13 14:22 ` danielhf
2005-08-15 6:15 ` Dirk Heinrichs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox