Jump to content

How to stop CHMOD 777


bambinou1980

Recommended Posts

Hello,

 

I would like to know how I can stop my image upload folders to be CHMOD777.

What is the best way to takle this problem(step by step please).

I understand this is an issue with permission on the server but how can I do it in a way that I can lower the permission safely please.

 

What do I need to check for in my Linux server?(CENTOS 6.7 x86_64 standard).

 

Let's say I create a php upload script now and upload it to "http://mysite.com/script", what is the next step?

I am still a novice in PHP and struggle to understand how to get the technical flow of the next steps...... What to type, where to go in the server to find out the needed information to stop this problem from happening.

 

 

Thank you,

 

Ben

Link to comment
Share on other sites

Sorry what I mean is that any scripts with an upload image folder which I install on this dedicated server have to have the upload folders set to chmod777.

 

Right now I installed this script in a php file:

<?php
$processUser = posix_getpwuid(posix_geteuid());
print $processUser['name'];
?>
 
And it shows the user as "Nobody"
 
I am trying to understand why I must set every time my folders to CHMOD777, if I set them to CHMOD755, the uploads won't work..
 
How can I solve my upload problem without using CHMOD777(for security purpose) but still be able to upload my files.
 
I just checked, this server has Suphp installed. What shall I do Next please?
 
 
Thanks,
 
Ben
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.