PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, February 7, 2022

[FIXED] What is the right FTP permission for PHP files on a normal LAMP webserver?

 February 07, 2022     chmod, ftp, lamp, linux, php     No comments   

Issue

I need to know what the right FTP permision is for PHP files on a normal LAMP server? I heard about the linux permision rules and how to modify them using chmod but what are the dangers for a normal user like my client?

For instance, if he modified a PHP file with Filezilla to 777 is the world really allowed to write to the file? Thanks for your help and advises.


Solution

short answer 755 - it would make the file executable + readable for group and world, while writable for owner only

long answer: it depends on the file itself. usually executable code (php, ruby, perl, python) is set to 755 so that it can be executed by the web server. you can use this http://www.onlineconversion.com/html_chmod_calculator.htm to calculate permissions, most FTP clients have this (I believe at least CuteFTP on windows does have it).



Answered By - user83950
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing