PDA

View Full Version : Files and script permissions on dedicated servers



Albertwu
01-20-2016, 03:17 AM
Hello,

I am a novice php programmer and need a bit of help from a server admin to understand a few points where I am totally lost.

1)When I create a php script, how do I find out which user is running the script? I am using the OS: CENTOS 6.7 x86_64 standard

2)I cannot upload a single image in my folders if the folders are not chmod777, how can I stop this please?

3)I only have 1 single account on my dedicated server, how can I let the script run using this user to remove any chmod problems please?


If you could send me a few commands it would be fantastic!
I am just trying to make my server a bit more secure by eliminating any folders which have chmod777.

Thanks!

Shay_Fox
01-21-2016, 12:42 PM
Well Albert i don't even know about this. Maybe someone help you to figure out.

kanimozhi
02-20-2016, 12:38 AM
albert nice to hear if you wanna details follow tutorial point.

ikoula
02-23-2016, 11:50 AM
Hello,

I am not an expert in scripting so double check informations i am giving you.
System account is running your script.
You should apply 755 rights on your files and folders (not all your files and folders).
You can't automate files and folder rights, you have to setup them manually but you can apply rights to folders and its children using recursive argument.