1

I have just installed ownCloud. I chose the data directory (default: /var/www/cloud/data/) to be on a network share on my windows server.

This share is located at

/home/christophe/SeagateDrive/OwncloudData/

I mounted this share by adding this line to fstab:

//192.168.1.130/Seagate /home/christophe/SeagateDrive cifs user=administrator,password=pwd 0 0

But now I get an error from ownCloud saying that the user does not have write permissions to this directory so I did the following:

sudo chown -R www-data:www-data /home/christophe/SeagateDrive/OwncloudData

But this doesn't fix the problem. Everytime I navigate to the directory and do

ls -ld

the only user showing up is root.

Is there a way to fix this?

0

To give write permissions you should use the following command:

chmod 777 /home/christophe/SeagateDrive/OwncloudData/

or

chmod go+rwx /home/christophe/SeagateDrive/OwncloudData/

Changing the owner is not a good ideea in this case. You can be the ownner of a file, but you may not have read/write access to that file.

4
  • Shouldn't I specify that I want to give write access to www-data? This still gives me root only when I "ls -ld" and ownCloud still complains about not being able to write to the directory. – Christophe De Troyer Aug 22 '13 at 13:58
  • @ChristopheDeTroyer You don't have to do nothing else. See my new edits. – Radu Rădeanu Aug 22 '13 at 14:15
  • I understand your comment, but executing those two command (or any of the two) does not solve my problem. I tried each of both and restarted apache2 but apache2 still has no write access. – Christophe De Troyer Aug 22 '13 at 14:19
  • @ChristopheDeTroyer Sorry, I was thinking to a file. Is a directory in fact so you should use chmod 777. I edited my answer. – Radu Rădeanu Aug 22 '13 at 14:24
0

I have solved this by now.

The solution was to edit the fstab file.

In there I had to give the extra parameters:

gid=www-data
file_mode=0770
dir_mode=0770

This gave the group www-data write permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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