Question:
chmod 777 making a file writable ?
mrajsmith2000
2008-02-01 06:15:46 UTC
Hi

I have a php file that I need to make writable I'be been told to use chmod 777 but I haven't a clue what that means - I am using Smartftp anyone got any ideas ?
Three answers:
samhainthirteen
2008-02-01 06:24:30 UTC
"chmod" is the command that is short for "change mode".



"777" is the numeric equivalent to:



Owner - read and write

Group - read and write

World - read and write



the are file and folder permissions in Unix and Unix-like systems.



Therefore, "chmod 777" changes the mode of a file so that everyone has "read and write" permissions to it; meaning, it can be modified by anyone.



More information:

http://catcode.com/teachmod/
Barrett
2008-02-01 06:21:30 UTC
Hi there,



Changing the chmod is the same thing as changing the permissions. In SmartFTP....



How To CHMOD file/folder(s)



1. To change a file's permissions, left-click on the file or directory to highlight it.



2. Right-click on the file and a pop-up menu appears. Choose "CHMOD" and type in the number manually (ex: 444) or use the check boxes.



3. You can also enable the "Command Line" window, which will allow you to send raw commands directly to the server.



4. To find the "Command Line" select View > Toolbars > Command Line from the SmartFTP menu. The "Command Line" when enabled, will be viewable under the "Log View" window.



Doing steps 1 & 2 should get the results you need.



Hope that helps, good luck with it!
2008-02-01 06:29:12 UTC
Ok first point just to make the file writeable 7 is not required.



7 is read / write and execute. but if you have a php file, it needs to be executable in most cases.



The first number is chmod is what the owner can do.



chmod 700 file - makes it so that the owner reads writes and executes teh file no one else.



second number is group of the owner



chmod 770 - owner and owners group reads writes and executes file - no one else



final is everyone



chmod 777 allows everyone, owner group and word to read write and execute the file.



Other values are



2 - write

4 - read

1 - execute



Now when you add these together you get the combined result. 2 + 4 + 1 = 7 so 7 = read write and execute.



Lets say I wanted everyone to be able to execute but only owner to read and write



chmod 711 filename





Hope this helps


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...