0

I upload files using a form in php to a folder in my Ubuntu 16.06. I've used sudo chmod -R 777 /opt/lampp/site/file_content But when I upload the file, its permissions weren't set to 777.

I need help to change the uploaded file permissions to 777.

Sarath
  • 365
  • 3
    No you do not. There is not a single valid reason for you to want that. – Rinzwind May 23 '17 at 11:10
  • Yes there is @Rinzwind I need to access the uploaded file. Without the permissions who can they be accessed. Please help if you can. – Sarath May 23 '17 at 11:16
  • 1
    Love that response Rinzwind. Listen to him you do not want to have 777 on your files. That means they are executable and you don't want them to be executable and writable by EVERYONE. What you need is a specific user/usergroup which has access to it. Set it up properly, add users which need access to the files into the same group and live a secure and happy live. – Ziazis May 23 '17 at 11:26
  • @Ziazis I agree to both of you. Then if I need to change to something else even, I want to know. If 755 is fine, I can go for it. – Sarath May 23 '17 at 11:31
  • If you do not trust me on this: read this answer from Gilles: https://unix.stackexchange.com/a/12847/10017 and check his history on Unix. – Rinzwind May 23 '17 at 12:11

0 Answers0