You are not logged in.

#1 2004-12-28 23:45:33

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 356
Website

Samba permission troubles in linux

I have a Samba server which has a few shares, one being the wwwroot folder for an Apache web server on the same box.This share works great with the login jjohnson (and password) in Windoze however when I mount it in linux (via fstab, entry posted below) permissions are strictly root everything. How do I mimic the Windoze way so I can edit the files on the webserver without access denied errors? I know I could change the permissions of the folders for the wwwroot share but I'd prefer not to change the users or groups attributes because it makes me uneasy for security reasons.

fstab:

//192.168.1.14 /mnt/wwwroot smbfs username=jjohnson,password=X,user 0 0

Thanks for any help,
JSkier


--
JSkier

Offline

#2 2004-12-29 03:31:30

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: Samba permission troubles in linux

man smbmount

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.
                                                                               
       port=<arg>
              sets the remote SMB port number. The default is 445, fallback is
              139.
                                                                               
       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 de-
              fault is based on the current umask.

assuming you want the permissions to be set for userx, you could try:

//192.168.1.14 /mnt/wwwroot smbfs username=jjohnson,password=X,uid=$USER, 0 0

Not sure if $USER will expand properly, or if you need to replace with an actual username. *shrug* Give both of them a shot.
Or, you could just set a decent mask for the files.

//192.168.1.14 /mnt/wwwroot smbfs username=jjohnson,password=X,fmask=0777, 0 0

"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2004-12-29 07:46:51

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 356
Website

Re: Samba permission troubles in linux

Still nothing works... Tried setting gid to users and uid to jjohnson (I have the same user on my client as well). The umask doesn't do anything either. However when I do smb://192.168.1.14/wwwroot all works fine. Also if i'm root on the client machine I can do whatever if I go through the fstab mount, so there must be some stupid permission thing on the client side we're missing here  :twisted:

JSkier


--
JSkier

Offline

Board footer

Powered by FluxBB