Hi All,
I wanna modify folders and files on the remote server(Linux + Apache) with PHP, but all of the folders and files are usually '755' purview, I can't use php to modify them.
And if I change a folder to '777', so I can modify it and create files in it, but I can't use ftp account to modify it.
The server administrator told me he doesn't like I change them to '777', I just can use the purview '755'.
So I want to know How I can solve this problem, may be I can use php to login the linux.
Thanks for all your answers.
user group problem on Linux + Apache
Moderator: General Moderators
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: user group problem on Linux + Apache
The files are 0777 and your FTP-client can't modify those files?ctmaster wrote:And if I change a folder to '777', so I can modify it and create files in it, but I can't use ftp account to modify it.
Re: user group problem on Linux + Apache
Sorry, usually I create files by php script are '644', And I can't use ftp to delete it.kaisellgren wrote:The files are 0777 and your FTP-client can't modify those files?ctmaster wrote:And if I change a folder to '777', so I can modify it and create files in it, but I can't use ftp account to modify it.
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: user group problem on Linux + Apache
Ok, that makes sense. 0644 means that only the owner of the file (the one who created it) has rights to modify it. Try to CHMOD it to 0664 or 0666 or change the owner with CHOWN.ctmaster wrote:Sorry, usually I create files by php script are '644', And I can't use ftp to delete it.kaisellgren wrote:The files are 0777 and your FTP-client can't modify those files?ctmaster wrote:And if I change a folder to '777', so I can modify it and create files in it, but I can't use ftp account to modify it.
Re: user group problem on Linux + Apache
So, thanks Kai.
But I have to know how can I use php script to get the purview, under '755' to modify the files and folders.
But I have to know how can I use php script to get the purview, under '755' to modify the files and folders.
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: user group problem on Linux + Apache
chmod()/chown()?ctmaster wrote:So, thanks Kai.
But I have to know how can I use php script to get the purview, under '755' to modify the files and folders.
Re: user group problem on Linux + Apache
There are 10 types of people in this world, those who understand binary and those who don't