Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two ubuntu ec2 servers - let's say ServerA and ServerB. ServerA has a large EBS attached to it and it's shared via Samba. This EBS is mounted to ServerB on /var/www/static. If I create file from ServerB using the ubuntu user (which exists on both servers), the default permission is set as follows -rw-r--r-- 1 ubuntu ubuntu 0 2012-05-16 09:21 test

What I am trying to do is give full permission (777) to all files in this share whoever creates the file from whichever server.

My fstab looks like this

//ServerA/static /var/www/static cifs credentials=/home/ubuntu/.smbclient,umask=000 0 0

share|improve this question
    
This is my samba configuration #======================= Share Definitions ======================= [static] comment = Static Content browseable = yes writable = yes path = /var/www/static –  Optimus May 16 '12 at 16:24

1 Answer 1

up vote 1 down vote accepted
[static]
   comment = Static Content
   browseable = yes
   writable = yes
   path = /var/www/static
   force create mode = 0777

In addition, you can use ACL to grant permissions for created items:

setfacl -m user:www-data:rwx,default:user:www-data:rwx,mask::rwx /var/www/static
getfacl /var/www/static

Look for inherit acls, inherit permissions etc. in the smb.conf man page.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.