Jump to content

Folder Permission


naresh_nsk

Recommended Posts

Hi, I am Naresh. I have created a subdomin in coding, but in the subdomain folder inside we need to move file index.php. That time it throw permission denied problem. suppose i have give permissions for FTP through right click and change CHMOD to give permission means its working.But in the php coding function chmod ("naresh",0777) given its not working. Its through operation not supported." Warning: chmod failed: Operation not permitted in /var/www/html/Gameonn/chmod.php on line 3" Mainly i need for dynamic give the permission.Please help me any one do this how to do advise me.Regards,Naresh

Link to comment
Share on other sites

I think this would have to be in the php.ini setting. Go through there and look for anything that has to do with permissions. Or you could just edit them manually without code..OK, after about 10 seconds of looking at the forum I saw something that was the exact same as this. Next time maybe just look over the forum?

I'm putting my money on the fact that safe mode is enabled. You can check like this:echo "safe mode: " . ini_get("safe_mode");If it is on, then you cannot use chmod, and not only that, but when you create a directory the PHP process does not own it and cannot write to it or otherwise alter it. Which is fun.If that is the case, you will need to make an FTP connection to the server and use the FTP commands. Then you will be able to use chmod, and the directory will be created with the PHP process as the owner.Edit this to suit your needs, you can leave the IP address as it is. Also, like shiftJIS said, if you can avoid mode 0777 and use 0775, 0755, or 0644, it will probably be better. The chmod happens in the function below, so find that and change it to suit your needs. Also, keep in mind that this function starts in the root of the FTP server, wherever that is. FTP to the server yourself and check, but keep that in mind when specifying the path.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...