Change permission for a set of files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Change permission for a set of files
# 1  
Old 06-29-2009
Change permission for a set of files

Hi there,

I want to change from this permission -r-xr-xr-x to -r-xr-xr-- for a set of files under unix.

Can someone help me to go-about doing this in one shot.

Cheers,
RN
# 2  
Old 06-29-2009
chmod does that.

You need to define 'set of files' However if all of the files are in a single directory
Code:
chmod 554 /directory/*

Warning this will also change protections on sub-directories of /directory - just the directory files, not what is in those directories.
# 3  
Old 06-29-2009
This command will change the permission for all specified files but I want to find files with this permission -r-xr-xr-x and change it to -r-xr-xr-- for a group of files
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

How to set owner and permission for files/directory in directory in this case?

Hi. My example: I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that chown -R log_adm /log/* chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies

2. HP-UX

Sudo entry required to set permission similar to ROOT without using password (PASSWD) change optio

Hi All I had installed sudo in HP UX 11.3 and it is working fine but not able to make entry required to set permission similar to ROOT without using password (PASSWD) change option for define user in /etc/sudoers file Please help if some know the syntex? :confused::wall: (2 Replies)
Discussion started by: deviltech
2 Replies

3. Shell Programming and Scripting

Help to set permission on password files in script

Hi Techies I am stuck in a problem, I have written a script which is calling a second script which contains some command and password for quering on database. I do not want to disclose this command or specially password file. Please help.. Please have a look on directory structure and... (2 Replies)
Discussion started by: atul9806
2 Replies

4. UNIX for Dummies Questions & Answers

How to set default permission

Hey Guys, First post here. I just started learning UNIX a few weeks ago. My issue: I use FreeNAS which is based off of UNIX in my network environment which hosts files that my team needs to access. Each user has their own login but we are all part of a group called "ITLIC". I have a share... (15 Replies)
Discussion started by: uglycustoomer
15 Replies

5. Shell Programming and Scripting

set permission on file to 777

Here is the sample code I'm trying to execute. I see that the permission on the file is set to 755 always I want to change it to 777. Please help me with this. code : #!/usr/bin/perl use File::Path qw(make_path remove_tree); my $path = "2010/sam"; make_path($path,{mode=>0777}); ... (1 Reply)
Discussion started by: hansini
1 Replies

6. UNIX for Dummies Questions & Answers

Copying files to a different server without Permission level change..

Hi, I was trying to copy/transfer some new and old files from one server to another server. I found the permission of the files are different in both servers. I tried to tar all the files and then send to the other server, and then also the permission level is different after copying the files.... (4 Replies)
Discussion started by: ronix007
4 Replies

7. AIX

set permission to files in /tmp

Trying to setup user to have the ability to delete any files (regardless of owner) in /tmp. I've tried almost everything... the permission on the folder is drwxrwxrwt 10 bin bin, and at one point I give all the possible permission (short of root) I can give to the user, and he still can't delete... (2 Replies)
Discussion started by: cchiang12
2 Replies

8. Shell Programming and Scripting

change files permission on Remote machine

I would like to change permissions recursively on a remote folder. Seems like sftp has a limitation, I am only able to change permission on a individual file.. sftp > chmod 777 /usr/local/apache/docs/test.txt It would be great if someone has more knowledge on how this is doable recursively? (1 Reply)
Discussion started by: almeisan1
1 Replies

9. Shell Programming and Scripting

Change permission for directories and files

Is there a way to change subdirectories permission plus the files in the subdirectories in a directory i specified without using the find command? (1 Reply)
Discussion started by: mingfei2006
1 Replies

10. UNIX for Dummies Questions & Answers

set up cron permission in Sun

Under this directory: /var/spool/cron/crontabs/ I have the following users: adm lp oracle root sys uucp I believe who are able to start a cron job. I am trying to create a cronjob under user banjob so that it can delete files older than 30 days. How can I add user banjob... (4 Replies)
Discussion started by: simt
4 Replies
Login or Register to Ask a Question