unixmiah
unixmiah

Reputation: 3143

PHP Warning: mkdir(): Permission denied in Seperate filesystem

This may or may not be a duplicate question, partly because the destination folder it's trying to write to, is on a Windows filesystem. I have a script which has a mkdir php function in it, which is trying to create a folder and a file to a mounted windows file system.

Permission on the file

-rwxrwxrwx. 1 apache apache 24850 Jan 6 11:31 fns.php

Permission on the folder is

drwxr-xr-x.   8 a-linux-user root        0 Dec 29 15:55 ACT!

I have the file system mounted on /media/shared

I'm getting a mkdir(): Permission denied error. I was wondering where I should start debugging the issue.

My httpd.conf file has this permission:

User apache 
Group apache

the line or the fstab is

//domain.com/shared /media/shared cifs uid=a-linux-user,credentials=/home/some-dir/.creds,domain=GRM,comment=systemd.au‌​tomount 0 0 

Upvotes: 0

Views: 1664

Answers (1)

Gaurav Dave
Gaurav Dave

Reputation: 7494

Edit your apache -> conf -> httpd.conf file & change User and Group from daemon to your machine owner name. (in your case: a-linux-user) See if that works.

Upvotes: 1

Related Questions