I have bought WD myCloud storage and I have mount it to centos 7 by adding this line to fstab
Code:
\wd_mycloud_ip_address\shared_folder /backup cifs rw,suid,username=shared_folder_username,password=shared_folder_password 0 0
after that i mount using
it works fine, and I am able to insert/create/delete files into the /backup which is mirrored into the WD storage Note that the directory /backup has chown root:root
the problem now when I want to let the apache (using php web application) itself save files into the mounted directory /backup , I am getting an error in my web application "The destination folder is not writable."
I tried diffrent senario to solve the issue but unfortuntly it dosen't works fine.
First I have umount the /backup, changed the
Code:
chown -R apache:apache /backup
, the web application is able to save the files. but the problem this only when I umount.
second, while the /backup is mounted with "chown root:root", I have tried to change it is owner/group to apache:apache but it doesn't allow. the commend goes without an error but when I "ls -al" it show me it is still root:root.
How can I mount a /backup directory using root:root and at the same time let the web application save files into /backup using apache:apache ?