WordPress and chmod

by keif on September 13, 2008

A friend of mine recently contacted me about a little accident with filezilla and setting permissions – see where this is headed? – for whatever reasons, filezilla starts to bug out and does a chmod 774 on EVERYTHING. Site goes down, nothing works. Blank page. Foreign file system, so I couldn’t get access to the server logs. Basically, one of those – I know I can chmod this, but what are they supposed to be again?

So, I could use transmit – but screw that noise. I wasn’t in the mood for “get info” – “apply all?” and finding out I misconstrued a directory or file.

NCFTP is my backup, but I could only scrounge up the SSH command to mass fix the CHMOD.

The command that saved the day (and saved some time) was combined from two sources:


find . -type f -print0 | xargs -0 chmod 444


find . -type d -print0 | xargs -0 chmod 755

Let this be a lesson, kids – always make sure you don’t mass edit your files, and back-up, back-up, back-up!

Comments on this entry are closed.

Previous post:

Next post: