Gentoo Archives: gentoo-user

From: Jim <Jim@×××××××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Mount permissions
Date: Mon, 13 Mar 2006 17:56:09
Message-Id: 4415B029.8000704@keeliegirl.dyndns.org
In Reply to: [gentoo-user] Mount permissions by Paul Stear
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On 163718720 Paul Stear <gentoo@××××××××××××.com> wrote:
5 > The root of all my rsync/network problems is a permissions problem
6 > The /mnt/network is
7 > drwxrwxrwx 3 root root 4096 Mar 13 13:24 test
8 >
9 > After I mount using
10 > mount -t smbfs -o
11 > username=paul,password=pass //LKG7DDD5F/gentoobackup /mnt/network
12 >
13 > the /mnt/network permissions have change to
14 >
15 > drwxr-xr-x 1 root root 0 Mar 13 16:57 test
16 >
17 > How do I ensure the permissions stay the same after the mount
18 >
19 > Paul
20
21 type man mount or man mount.cifs.
22
23 Once in man, press / which will let you search. Now type smbfs and hit
24 enter. You should see the options for smbfs. The interesting ones are:
25
26 uid
27 gid
28 umask
29 fmask/file_mode
30 dmask/dir_mode
31
32 uid will let you set a user id for all files
33
34 gid will let you set a group id for all files
35
36 umask remove umaks bits. for example if you mount with umask=000,
37 everything will be 777 or rwx.
38
39 fmask/file_mode set the mas for files
40
41 dmask/dir_mode set the mask for directories
42
43 If you are mounting win2k or higher, you should use cifs. This is how I
44 mount my C$ share on my WinXP laptop:
45
46 mount -t cifs -o
47 username=administrator,gid=100,file_mode=0660,dir_mode=0770
48 //laptop/C$ /mnt/laptop
49
50 The above is should be one line. This will mount my laptops C$ share
51 and give permission for everyone in the users group to read/write/execute.
52
53 If you need to mount < win2k then you would change cifs to smbfs,
54 file_mode to fmask and dir_mode to dmask.
55
56 Jim
57 -----BEGIN PGP SIGNATURE-----
58 Version: GnuPG v1.4.2.2 (GNU/Linux)
59 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
60
61 iD8DBQFEFbApeqJ5Vbm4CxYRAm0BAJsEgG+wLteEQ3ObxncyONuQyquOeACfdEDI
62 KE+BUBJTU1VpvmOEL09MthU=
63 =djHQ
64 -----END PGP SIGNATURE-----
65 --
66 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Mount permissions Paul Stear <gentoo@××××××××××××.com>