Forum Moderators: phranque

Message Too Old, No Replies

SSH, uploading .zip files and permissions .

.. are automatically set to 666

         

old_expat

5:34 pm on Sep 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm on a satellite so uploading lots of small files is best accomplished with .zip files, then opening them with Putty.

The first time I did this, I noticed an error log entry that said files had permissions set that allowed others to write.

Sure enough, permissions were set at 666. Okay, no big deal *if I remember* .. or if I'm only loading 1 or 2 directories.

Also, I believe that one/some of my .php files didn't wotk at 666.

Some of my recent uploads involved more than 10 directories.

The command to chmod to 644 seems only to work in the target directory.

Is there a single command that will chmod *all* files [*.*] in *all* directories?

Right now I have to remember to set permissions in every directory with a separate command.

dcrombie

10:44 am on Sep 10, 2005 (gmt 0)



chmod -R o-w .

(recurse through the filesystem starting with the current directory and remove group write permissions)

;)

old_expat

8:14 am on Sep 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



dcrombie, thanks a lot! :)))