Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
netmount --> Folder Permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
wizardofos
Apprentice
Apprentice


Joined: 20 Jul 2004
Posts: 201

PostPosted: Mon Dec 06, 2004 8:02 am    Post subject: netmount --> Folder Permissions Reply with quote

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
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon Dec 06, 2004 8:15 am    Post subject: Reply with quote

What's in conf.d for netmount ?
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
wizardofos
Apprentice
Apprentice


Joined: 20 Jul 2004
Posts: 201

PostPosted: Mon Dec 06, 2004 8:22 am    Post subject: Reply with quote

There is no file called netmount in /etc/conf.d...
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon Dec 06, 2004 8:46 am    Post subject: Reply with quote

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
View user's profile Send private message
wizardofos
Apprentice
Apprentice


Joined: 20 Jul 2004
Posts: 201

PostPosted: Mon Dec 06, 2004 4:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Dec 07, 2004 8:08 am    Post subject: Reply with quote

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
View user's profile Send private message
wizardofos
Apprentice
Apprentice


Joined: 20 Jul 2004
Posts: 201

PostPosted: Tue Dec 07, 2004 8:40 am    Post subject: Reply with quote

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
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Dec 07, 2004 9:28 am    Post subject: Reply with quote

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? ;-)
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
wizardofos
Apprentice
Apprentice


Joined: 20 Jul 2004
Posts: 201

PostPosted: Tue Dec 07, 2004 4:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum