View previous topic :: View next topic |
Author |
Message |
wizardofos Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/36812764141021fac1bfcf.jpg)
Joined: 20 Jul 2004 Posts: 201
|
Posted: Mon Dec 06, 2004 8:02 am Post subject: netmount --> Folder Permissions |
|
|
Hello
I've several samba shares on a file-server which i mount with netmount at startup. But whenever I set the permissions of the folders (shares) to be writable for every user on my machine, netmount resets it. When I do umount <share> i get my (writable) permission again.
Hope anyone could help.
Thank you!
Fabian |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Dec 06, 2004 8:15 am Post subject: |
|
|
What's in conf.d for netmount ? _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wizardofos Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/36812764141021fac1bfcf.jpg)
Joined: 20 Jul 2004 Posts: 201
|
Posted: Mon Dec 06, 2004 8:22 am Post subject: |
|
|
There is no file called netmount in /etc/conf.d... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Dec 06, 2004 8:46 am Post subject: |
|
|
Then you'll have to examine (read: read) the initscript for netmount and see what actually happens.
But I would be very surprised if it didn't honor the options you set in fstab for those shares...
What is in your fstab ? _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wizardofos Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/36812764141021fac1bfcf.jpg)
Joined: 20 Jul 2004 Posts: 201
|
Posted: Mon Dec 06, 2004 4:22 pm Post subject: |
|
|
Code: |
//192.168.0.1/tauschkasten /mnt/file-server/tauschkasten smbfs auto,guest
//192.168.0.1/files /mnt/file-server/files smbfs auto,guest
//192.168.0.1/musik /mnt/file-server/musik smbfs auto,guest
//192.168.0.1/videos /mnt/file-server/videos smbfs auto,guest
//192.168.0.1/server-daten /mnt/file-server/server-daten smbfs noauto,username=<user>
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Tue Dec 07, 2004 8:08 am Post subject: |
|
|
So... you're not directly mounting these with a specific username.
I should try that.
EDIT: wait a moment...
It may be that samba forces the UID/GID and umask you specify in fstab onto the mounts - if you don't specify them in fstab then there's no guarantee it'll work.
If you want safe and simple specify all the options you need in fstab - uid, gid, umask etc. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wizardofos Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/36812764141021fac1bfcf.jpg)
Joined: 20 Jul 2004 Posts: 201
|
Posted: Tue Dec 07, 2004 8:40 am Post subject: |
|
|
from man smbmount:
Code: |
uid=<arg>
sets the uid that will own all files on the mounted filesystem. It may be specified as either a username or a numeric uid.
gid=<arg>
sets the gid that will own all files on the mounted filesystem. It may be specified as either a groupname or a numeric gid.
fmask=<arg>
sets the file mask. This determines the permissions that remote files have in the local filesystem. This is not a umask, but the actual permissions for the files. The default is based on the current umask.
dmask=<arg>
Sets the directory mask. This determines the permissions that remote directories have in the local filesystem. This is not a umask, but the actual permissions for the directories. The default is based on the current umask.
|
This doens't make sense to me. When I set fmask or dmask all files or dirs I create in the mount shares will be owned by the specified user. But when I write on the smb shares, the samba server actually sets the owner and group himself so from my remote machine i doens't habe any influence on this, hm?
*confused* |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Tue Dec 07, 2004 9:28 am Post subject: |
|
|
They are cumulative.
You still need a valid user to connect with smbmount, and only if this user has admin (root) rights on the share will the permissions you set in fstab be honored - else they will be merged as far as the user does have rights.
Confused more? ![Wink ;-)](images/smiles/icon_wink.gif) _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wizardofos Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/36812764141021fac1bfcf.jpg)
Joined: 20 Jul 2004 Posts: 201
|
Posted: Tue Dec 07, 2004 4:48 pm Post subject: |
|
|
Yeah...
Funnily enought, when I move files on the shares as root i wait for about 5 minutes for 10kb. the files get copied but it says something like:
"Couldn't set permissions, read write error"
Fabian |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|