Knowledge Base: CGI and Perl
What is CHMOD?
Posted by Mike Kohli on 04 March 2013 04:10 PM

What is CHMOD?

CHMOD is changing the attributes of a file. (UNIX systems only.). You should do that when you have uploaded the file, or create a new directory. Most FTP clients (like WS_FTP and BulletProofFTP) have the feature, only they call it CHANGE ATTRIBUTES and won't really show number but instead they showREADABLE, WRITEBLE and EXECUTABLE. You can find out what you need to do by using this: 
BinaryDecimal 
000 = 0 
001 = 1 
010 = 2 
011 = 3 
100 = 4 
101 = 5 
110 = 6 
111 = 7 

r = readable 
w = writeble 
x = executable 

So to set the permission above, "rw-r--r-x", on the file "test.txt," you would figure out the decimal first: 
rw- r-- r-x = 
110 100 101 = 
6 4 5



Copyright © 2000 - 2013 Megrisoft Limited