LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-29-2010, 01:38 AM   #1
raghoos666
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Rep: Reputation: 0
cant able to edit files which are created in samba shared folder


Dear all,

i have created an folder inside my redhat server. and i shared it via samba and mapped that shared folders inside 5 windows machine. now the problem i am facing is, if any one create a file in that mapped drive the other user cant edit that same file. but he can read it. only for files not folders.

i gave full permission to that folders and subfolders
and in smb file i gave readable writable browsable permissions.
and i disabled se linux and firewall

still its showing the same. its annoying me. please give me a solution for solving this.
 
Old 09-29-2010, 02:42 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
what permission assigned when user create file in shared directory?

what is value of create mask directive in smb.conf ?

Regards,
 
Old 09-29-2010, 03:16 AM   #3
raghoos666
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Original Poster
Rep: Reputation: 0
i assigned rwx permission
i didnt give any value. is it necessary to give value in smb.conf?
 
Old 09-29-2010, 03:29 AM   #4
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by raghoos666 View Post
i assigned rwx permission
i didnt give any value. is it necessary to give value in smb.conf?
when one user create file in shared dir. from windows machine which permission assigned to that file?

default create mask value is 0700

Regards,
 
Old 09-29-2010, 04:16 AM   #5
raghoos666
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Original Poster
Rep: Reputation: 0
for the user which creates the file having read write and excute. rest all having read only permission...may i know how to change that permission to read write and execute for all users accessing that folder.

i gave 777 permission to that shared folder and its subfolder.

ie # chmod -R 777 /data
 
Old 09-29-2010, 04:42 AM   #6
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by raghoos666 View Post
for the user which creates the file having read write and excute. rest all having read only permission...may i know how to change that permission to read write and execute for all users accessing that folder.

i gave 777 permission to that shared folder and its subfolder.

ie # chmod -R 777 /data
use create mask directive for your samba share and check it.

i.e
Code:
[share]
path = /your/path
.....
....
create mask = 0775 <- this will allow write permission to owner and group
Regards,

Last edited by sem007; 09-29-2010 at 04:43 AM. Reason: typo
 
Old 09-29-2010, 06:15 AM   #7
raghoos666
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Original Poster
Rep: Reputation: 0
yea i add dis but still not working...wat to do now...the new files which are created under that shared folder is still in read only mode for others which accessing the same folder. i think still the new files not getting inheritance permissions... can u pls help me
 
Old 09-29-2010, 07:03 AM   #8
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Post your samba configuration using below command.

Code:
testparm
Regards,
 
Old 09-30-2010, 12:30 AM   #9
raghoos666
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Load smb config files from /etc/samba/smb.conf
Processing section "[acc]"


[acc]
comment = Accounts files
path = /data/accounts
write list = akhil, sree
read only = No
create mask = 0777
 
Old 09-30-2010, 03:57 AM   #10
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Did you restart smb service ?

Regards,
 
Old 09-30-2010, 06:27 AM   #11
raghoos666
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Original Poster
Rep: Reputation: 0
yea i restarted smb service
 
Old 09-30-2010, 06:30 AM   #12
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Can you post the last 50 lines from the smb.conf file?
 
Old 10-13-2010, 08:04 AM   #13
Fogeytron
LQ Newbie
 
Registered: Jan 2005
Posts: 4

Rep: Reputation: 0
I am having the same problem. I have a create mask = 0777 and it does not work.

What I have read indicates that the create mask only works if you are copying files from a windows machine to the Samba shared folder and it does not work when copying files from another linux machine or Mac OS X.

This is exactly what is happening for me, if I copy files from windows, it properly sets the permissions, but if I copy from my mac it does not.

Can anybody verify that? and if that is the case provide a method to apply the desired permissions when copying from a mac or linux.

Thanks, below is my complete smb.conf file

[global]
log file = /var/log/samba/samba.%m
workgroup = AYC
server string = Samba Server Version %v

netbios name = AYC01
encrypt passwords = yes

#security = share
passdb backend = tdbsam

cups options = raw

wins support = yes

hide files = /.DS_Store/Thumbs.db/
#============================ Share Definitions ==============================
[ayc]
comment = AYC File Server
path = /AYC01
public = yes
writable = yes
printable = no
valid users = +ayc
write list = +ayc
guest ok = no

# Permissions
#unix extensions = no
inherit permissions = yes
store dos attributes = yes
force group = ayc
create mask = 0777
force create mode = 0777
directory mask = 0777
force directory mode = 0777
 
  


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
Shell script to monitor files created on a folder cmadiam82 Programming 9 05-11-2013 12:59 AM
Using Vim to edit files that were created with Dreamweaver - special characters mattca Linux - Software 10 04-08-2010 09:38 PM
Move files into a folder created by Perl ifeatu Programming 4 12-12-2009 09:41 PM
Sort files under a folder by created date Kunsheng Programming 3 05-11-2009 04:58 AM
Samba shared folder klmn1 Linux - Server 5 08-20-2008 04:22 AM

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

All times are GMT -5. The time now is 04:20 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