Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running a web server and the public_html folder is in a windows network drive shared by samba on Ubuntu Server 10.04.

I have apache2 VH set to point to the folder and it works great. However, when my Drupal 6 install tries to create its default files it can not write to the locations required.

Now, because this is only a dev machine; I have added www-data user and group to the visudo with ALL=(ALL) ALL

I have also gone and changed the httpd.conf file to have the following:

<Directory /media/samba>
      Order Allow,Deny
      Allow from all
</Directory>

When I change the envvars username to username with admin privileges it works just fine. Is there something i need to do with chmod to get www-data to work?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You need to change your samba mount configuration so that you give permission to the www-data user and group to write to it. You may or may not have the ability to set specific directory permissions, but if not you'll have to set the entire drive the write access (which is bad for security).

I would personally advise using nfs instead of samba shares for networked storage and the use of ext3 or other fully featured file system.

http://www.cyberciti.biz/tips/how-do-i-set-permissions-to-samba-shares.html

https://help.ubuntu.com/community/Samba/SambaClientGuide

http://www.mattvanstone.com/2006/06/automatically_mounting_smb_sha/

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.