LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 08-14-2008, 04:10 AM   #1
eRJe
Member
 
Registered: May 2005
Location: Netherlands
Distribution: Slackware 14.1 Kernel 3.12.1
Posts: 103

Rep: Reputation: 16
Keep file rights with samba share


Hi there,

I'm trying to set the file & directory rights in a users home directory permanently. The home directory is a Samba share and when users make changes to a file in Windows, the file rights are being changed. I don't want this to happen.

I've managed to get the group fixed but after changing the file in Windows, the file rights are changed to read-only for the group. If I could fix this, I would also be happy.

What I'm trying to accomplish here is setting up a (linux)user who's home directory is used to share documents between all other users. I did noticed that you can force Samba to set the rights to a specific user:group but then this would apply to all homes which not good.

Setting up a non-home directory as public share would probably be the easiest way but I would prefer using the home of an user.

Does anyone have an idea how I could do this?

Thanks,
Robbert
 
Old 08-14-2008, 06:54 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Giving a group of users read/write access to a users home directory is not a very good idea.
You could create a directory to share and create a symbolic link to it for this user.

There is a USERSHARES section of the smb.conf manpage. One of the options may be useful. I don't know if the users who log in are authenticated or not. With "Map to Guest = Bad User", an unauthenticated user will be mapped to "guest" which in Linux is the "nobody" user. The directory being shared needs permissions to allow writing by the authenticated user or the group or "Guest" for non-authenticated users. "Guest OK = Yes" needs to be used to allow access to a guest user. "Read Only = No" is needed to allow writing. An authenticated user need to be a Linux user as well, and the default umask setting might come into play as well.

The Samba windows permissions can't be greater than the Linux permissions. Also check the "Create Mask =" setting.
The default is 0744. Also check for a "force create mode" which may enforce read-only settings on created files.
 
  


Reply



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
swf file on samba share ssilayaraja Linux - Software 1 07-05-2008 05:54 AM
Samba OS X to Linux Samba file share error ttoomey Linux - Software 1 08-16-2005 10:12 AM
possible to see a Linux SAMBA File share... Russ3482 Linux - Software 1 08-11-2004 02:17 PM
samba as a file server/share mnadeemrao Linux - Software 0 10-30-2003 05:21 AM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:13 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
Open Source Consulting | Domain Registration