Permissions issue after copying files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Permissions issue after copying files
# 1  
Old 01-10-2010
Permissions issue after copying files

Hi everyone,

I am using mac os x 10.6, and I just copied over a project from a machine with 10.5... And I noticed my ls color is very funky in this directory... I found that my permissions are all messed up, and am wondering if there is a way to recursively fix permissions?

This is how they look (i've never seen "@" before in permissions! What does that mean??)
Quote:
-rwxrwxrwx@ 1 patrick staff 10619 Sep 22 2008 README
-rwxrwxrwx@ 1 patrick staff 307 Sep 22 2008 Rakefile
drwxrwxrwx 12 patrick staff 408 Sep 20 18:16 app
(etc)
This is how they should look...
Quote:
-rw-rw-r-- 1 patrick staff 10011 Jan 10 13:04 README
-rw-rw-r-- 1 patrick staff 307 Jan 10 13:04 Rakefile
drwxrwxr-x 6 patrick staff 204 Jan 10 13:04 app
(etc)
So, this project has many subdirectories, so I just would like to go through and convert all directories to drwxrwxr-x, and all non directory files to -rw-rw-r--

Is there an easy way to do this? I couldn't find a recursive flag for chmod, nor do I know how to grab all directories as one *, and then separately grab non-directories as one *...

Thank you very much.

-patrick
# 2  
Old 01-10-2010
Code:
find /path -type d -exec chmod 775 {} \;
find /path -type f -exec chmod 664 {} \;

@ probably refers to an acl. See man chacl.
# 3  
Old 01-10-2010
Hello patrick, Jim.

The @ means that the files have extended attributes.

From the OSX man page for ls:
Quote:
If the file or directory has extended attributes, the permissions field printed
by the -l option is followed by a '@' character. Otherwise, if the file or
directory has extended security information (such as an access control list),
the permissions field printed by the -l option is followed by a '+' character.
You can view (or delete) these attributes using the xattr command, but some of them are used by Spotlight and can be quite useful.
# 4  
Old 01-11-2010
thank you very much! It works perfectly..

That "{}" is pure magic!

-patrick
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue with copying files into dir inside for loop

Hi , I'm trying to move/copy the files inside the loop into a directory . I tried the below code and the issue is the data is not copying into the created directory but the files are copying into another file file_path="/home/etc" Last_Day=20130930 mkdir $file_path/ARC_${Last_Day} ... (3 Replies)
Discussion started by: smile689
3 Replies

2. Solaris

Permissions issue

Hello, I'm having an issue with a directory that is used to forward Windows logs. I have a user account on Windows servers that uses SCP to put logs on my Solaris 10 server. A appliance called LogLogic then takes the logs from my server and stores them. I need to have have group read so the... (8 Replies)
Discussion started by: bitlord
8 Replies

3. Shell Programming and Scripting

Issue with copying files

Hi I have to write a shell script which copy files from one folder to another. When I try to do it directly from command prompt cp filename.dat /outgoing/filename.dat its working fine. But when I put the same command inside a shell script say test.sh its not getting copied. and when I check $?... (3 Replies)
Discussion started by: ravinunna
3 Replies

4. Shell Programming and Scripting

Permissions issue

Hi, I have a shell script which calls oracle procedure. Procedure creates a file using oracle utl_file and places file on unix server at loaction /tmp. The file permission is getting set to 640 (Owner=oracle, group=dba) I need it to be 644 by default. (So others can read it.) The umask... (4 Replies)
Discussion started by: krishna_gnv
4 Replies

5. Shell Programming and Scripting

Permissions Issue

Hi Experts, I have one ftp user which will FTP the files to two subdirectories of some other user. Say i have one user "xyz" . It FTP's the file to the directory of "abc" user. I have added xyz user in abc group. -rw-r--r-- 1 xyz abc 0 Jul 26 10:05 mo -rw-r--r-- 1 xyz abc ... (1 Reply)
Discussion started by: sugarcane
1 Replies

6. Shell Programming and Scripting

mkdir: copying a folder's permissions

Hi, I wanted to know how to create a folder using mkdir and then have it copy the permissions from another specified folder on the system. For example if I did this: mkdir /Volumes/USBSTICK/System How can I make it copy the permissions from the /System folder ? Thanks (4 Replies)
Discussion started by: pcwiz
4 Replies

7. UNIX for Advanced & Expert Users

Issue with File Permissions

one of the business users is ftping files into unix box using user name ftp_user, where as i am using infa_user to login into same unix box. When i am trying to access those or copy over those files from upload directory it says permission denied. Though i know the password of... (4 Replies)
Discussion started by: Ariean
4 Replies

8. UNIX for Dummies Questions & Answers

Issue with file permissions when using mailx

Hiya... I've got a script on AIX 4.2 that sends an email, with an attachment, that has always worked happily in the past and has chosen today to stop working. It now throws up an error "/tmp/Rs13492: The file access permissions do not allow the specified action" The /tmp/RsXXXXX file name... (2 Replies)
Discussion started by: phaedrus
2 Replies

9. Linux

permissions issue

We are trying to run a program on a Red Hat ES3 machine that works fine under root user but not as any other user. I believe its getting denied access to the USB ports (which this program needs), Does anyone know how i can open up access to the USB ports on a machine to all users. Thanks, Frank (0 Replies)
Discussion started by: frankkahle
0 Replies

10. HP-UX

File permissions issue

Hi, We have a apps database running on HP-UX 11.11. Yesterday, we had a problem with the server which was resolved after rebooting the server. Now the problem I am facing is that now the files created by application manager user has weird file permissions. Like instead of rw-r-r it is... (1 Reply)
Discussion started by: isingh786
1 Replies
Login or Register to Ask a Question