[CS-FSLUG] Copying files and permissions

Tim Young Tim.Young at LightSys.org
Mon Apr 12 20:11:30 CDT 2010

On a directory, you want the x bit.  So you want permission: 755 (not 
644).  The x on a directory basically gives you the ability to cd into 
the directory and do a ls.  But, on files, you might want 644 (because 
they are data files, not executable files).

So you can do two different commands.  At the top of your directory, 
make everything 644.
   chmod -R 644 .
Then, set the permissions of the directories to 755.
   find . -type d -exec chmod 755 {} \;

     - Tim

On 4/12/2010 7:57 PM, Ed Hurst wrote:
> Thank you all. Let me refine by restating, there are three steps.
> 1. copy files from Windows NTFS to external drive NTFS
> 2. wipe Windows and install Ubuntu
> 3. copy files from external drive NTFS to ext3
> Obviously the issue comes at #3. If I copy them from a VFAT jump 
> drive, it's about the same thing. I get the triple 'x' on every file 
> and folder, or I get 'drwx------' and '-rw-------'
> Further note: In times past, specifically with Ubuntu and other Debian 
> friends, when I use 'chmod -R 644', it manages to clobber access to 
> the folders. Instead of 'drwxr-xr-x' I get 'drw-r--r--'. I have no 
> idea why.

More information about the Christiansource mailing list