LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 07-07-2010, 02:30 PM   #1
cdex
LQ Newbie
 
Registered: Aug 2002
Location: near berlin, germany
Distribution: Debian unstable
Posts: 11

Rep: Reputation: 0
samba: forward permission bits to unix/linux clients


Hello everyone,

for my samba configuration problem, I can't find a good solution:

When mounting a samba share with linux, I want to have the permission bits forwarded from the server side (especially the eXecute bits).

The old/usual workaround for this is the mount option e.g. file_mode=0755
But, I don't want to set it for ALL files. Only those files should be executable which are executable on the server ...

my smb.conf contains:
Code:
follow symlinks = yes
# follow symlinks to paths outside the share
wide links = yes
# not at the same time ..
unix extensions = no
samba version 3.4.7 on both sides (Ubuntu Lucid, 10.04)

I need the "wide links" feature. Therefore, "unix extensions" is disabled anyway. Is this my problem or can I reach my goal alongside this settings ?

The documentation is somehow misleading, as it focuses on the Windows interpretation of permissions. But my question does not touch Windows: Linux <=> SAMBA <=> Linux
(Sometimes, I access this share with Windows too, but that shouldn't matter here.)

Has someone an idea ?
Thanks,
cdex.
 
Old 07-08-2010, 03:18 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
Quote:
Only those files should be executable which are executable on the server ...
But executable by which users on which machine? The users and groups on the server aren't necessarily the same as the users on the client. Presumably you only want root users (on either machine) to have root execute privileges on the server...

The solution should be to give your "client machine users" accounts with the same name on the server.

Or am I missing the question entirely?

Last edited by mostlyharmless; 07-08-2010 at 03:19 PM.
 
Old 07-09-2010, 10:32 AM   #3
cdex
LQ Newbie
 
Registered: Aug 2002
Location: near berlin, germany
Distribution: Debian unstable
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for your time

Quote:
Originally Posted by mostlyharmless View Post
Or am I missing the question entirely?
hmm, kind of, but no problem. Let me tell more background:

With samba I export data from the server which has there some users/groups and permissions set, as you mention. When I mount a samba share on the client, that doesn't matter because I can set all this at mount time completely arbitrary:

Code:
smbmount //192.168.5.1/my_share /mnt/host/ -o credentials=cred_host,uid=tet,gid=tet,file_mode=0644,dir_mode=0755,noserverino
As you see, I reset the user/group and permission to something useful on the client.

What I'm interested in, is the file_mode=0644
if I omit it, the default is used which is 0755 or similar. But the problem is, it's applied to all files independent of the setting on the server.

I would like to know if samba exports the permission bits also somehow ? To get individual file permissions without having to overwrite them with a default (all on the client side).

And, if I have to use unix extensions = yes to get this feature or if there is another way ? (Although I'm not sure if it's supposed to work with this setting)
 
Old 07-09-2010, 04:37 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
Quote:
But the problem is, it's applied to all files independent of the setting on the server.
Unfortunately, as far as I know, (from what I've read), there's no way to change the setting file by file in samba alone.

I suppose you could give them all execute privileges and write a filter of some sort to look at the permissions on the server and then deny execute privileges for files which didn't originally have execute permissions....

...but don't ask me how, it's over my head!
 
  


Reply

Tags
extensions, lucid, permissions, samba, unix


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADS <==> FedoraDS <==> Linux/Unix Clients? your_shadow03 Linux - Newbie 3 01-06-2010 02:34 PM
Samba MODIFY permission needs 'x' permission set in Linux? jlinkels Linux - Software 6 11-13-2009 10:30 AM
glibc change in header file sysdeps/unix/sysv/linux/bits/socket.h Bambi535 Linux - General 4 08-19-2008 03:45 PM
help for special permission bits lqchangba Linux - Security 2 02-20-2007 01:36 PM
Samba: Authenticate Linux-Clients in Samba Domain & Mount mule Linux - Software 0 12-10-2003 02:21 AM


All times are GMT -5. The time now is 02:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration