Override Samba Permissions
Posted: Tue Aug 09, 2011 7:20 am
I have a share that I created using the Amahi dashboard called Gallery3. It is part of my greyhole pool with multiple duplication. For (hopefully) obvious reasons, I would like to keep this share in the pool so that as users upload their photos to my Gallery3 site, the photos will be backed up to multiple hard drives.
I have figured out how to move the 'var' directory from the /var/hda/web-apps/gallery3/html directory to wherever I want using a symbolic link in the mentioned directory to wherever I move the files. This works great when I move it to another non-pool drive or if I move it directly to /var/hda/files/<someshare>. The problem is, everything I have read indicates that we should not be writing directly to the /var/hda/files/* folder, but rather to the locally mounted samba shares.
I have gotten the samba shares to successfully mount locally using the provided script; I have configured the Gallery3 var folder to point to the Gallery3 share I created in the Amahi dashboard; however, Gallery3 does not work because it requires 777 permissions on this share and the Amahi share does not have this.
I have tried chmod'ing the /mnt/samba/Gallery3 folder, but it immediately reverts (or perhaps never changes). I have tried to chown to apache (since this is the gallery3 default), but with the same result (no change). After attempting both of these, I have guessed that samba must be controlling permissions ...
I tried adding parameters to the share (using the Amahi dashboard interface) such as create mask = 0777 and directory mask 0777 (and so on); however, I've noticed that while these are added successfully to the smb.conf file - they do not replace the existing entries (they are just listed after) and they do not change the actual functionality of the shares.
I am sure I am missing something simple, but I have run out of ideas on my own. Any help would be appreciated.
If it is helpful, here is the Gallery3 portion of my smb.conf file as it stands (I have removed the Amahi dashboard parameters):
[Gallery3]
comment = Gallery3
path = /var/hda/files/Gallery3
writeable = yes
browseable = yes
create mask = 0775
force create mode = 0664
directory mask = 0775
force directory mode = 0775
dfree command = /usr/bin/greyhole-dfree
vfs objects = greyhole
Thank You
I have figured out how to move the 'var' directory from the /var/hda/web-apps/gallery3/html directory to wherever I want using a symbolic link in the mentioned directory to wherever I move the files. This works great when I move it to another non-pool drive or if I move it directly to /var/hda/files/<someshare>. The problem is, everything I have read indicates that we should not be writing directly to the /var/hda/files/* folder, but rather to the locally mounted samba shares.
I have gotten the samba shares to successfully mount locally using the provided script; I have configured the Gallery3 var folder to point to the Gallery3 share I created in the Amahi dashboard; however, Gallery3 does not work because it requires 777 permissions on this share and the Amahi share does not have this.
I have tried chmod'ing the /mnt/samba/Gallery3 folder, but it immediately reverts (or perhaps never changes). I have tried to chown to apache (since this is the gallery3 default), but with the same result (no change). After attempting both of these, I have guessed that samba must be controlling permissions ...
I tried adding parameters to the share (using the Amahi dashboard interface) such as create mask = 0777 and directory mask 0777 (and so on); however, I've noticed that while these are added successfully to the smb.conf file - they do not replace the existing entries (they are just listed after) and they do not change the actual functionality of the shares.
I am sure I am missing something simple, but I have run out of ideas on my own. Any help would be appreciated.
If it is helpful, here is the Gallery3 portion of my smb.conf file as it stands (I have removed the Amahi dashboard parameters):
[Gallery3]
comment = Gallery3
path = /var/hda/files/Gallery3
writeable = yes
browseable = yes
create mask = 0775
force create mode = 0664
directory mask = 0775
force directory mode = 0775
dfree command = /usr/bin/greyhole-dfree
vfs objects = greyhole
Thank You