Welcome Guest, Not a member yet? Register   Sign In
Problem using created directories using mkdir
#1

[eluser]td234[/eluser]
I am working on uploading photos and love the CI libraries to help, but I am having a little problem I hope someone can help.

I create a folder for each user so in my script I check to see if that folder exists and if not use mkdir to create it. mkdir creates the directory with the owner of 'apache', with permissions of 777.

[root@ photos]# ls -la user/1
total 8
drwxrwxrwx 2 apache apache 4096 Sep 7 09:58 .
drwxrwxrwx 3 opti4 apache 4096 Sep 7 09:58 ..

CI returns FALSE from function is_really_writable() when I try to upload the photo. It is because the owner is 'apache' and not 'opti4' who is the user of this virtual host. I am not sure why the 777 permission is not enough. If I change the owner to 'opti4' then it works fine. Problem is CI will not allow me to run chown when I create the directory so I cannot change the owner.

How can I create a directory on the fly and use it with CI?


Messages In This Thread
Problem using created directories using mkdir - by El Forum - 09-07-2009, 09:11 AM
Problem using created directories using mkdir - by El Forum - 09-07-2009, 09:33 AM
Problem using created directories using mkdir - by El Forum - 09-07-2009, 09:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB