Tag Archives: chmod

CHMOD and the recursive

I encountered an unusual situation in which a directory on the web server had exclusive permissions assigned to the root owner only. I had been attempting to ftp an image file to a directory on the server, but I had no permissions to do so, despite that the account I used had FTP rights. I couldn’t change permissions either via telnet (PuTTY) or another FTP client. It took me a bit of research before I figured out that I couldn’t change just the directory itself, but the entire directory including subs and files. To do this, I needed to add the argument “-R” (without the quotations) to recursively change the permissions of all files in all subdirectories of the directory whose permissions were being changed. What worked:

chmod -R 777 filenameordirectory

I had to log in as root via telnet to the server to make the changes.