Change the permission to previously used in unix ( chmod )

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Change the permission to previously used in unix ( chmod )
# 1  
Old 08-09-2011
Question Change the permission to previously used in unix ( chmod )

I have changed the premission of a file to 777. Now I would like to change permission to previously used ( UNDO ). Is there any command ?Smilie

Last edited by frintocf; 08-10-2011 at 01:22 AM..
# 2  
Old 08-09-2011
Undo chmod? No, you can't undo any unix command. Only backup and caution.
# 3  
Old 08-09-2011
You can try using "rpm --setperms" along with "rpm --setguids" if the file was from a rpm package.
# 4  
Old 08-10-2011
Yazu, Thanks for your reply......yes I am looking for undo option for the command chmod ......It is shame that unix does not have this option.

Tworkemon....The file is not from rpm package.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Permission denied error using chmod on a cifs mount

I have a RHEL 5.7 system with a cifs mount from a Windows 2007 file server that I need to fix the permissions on. Once the share is mounted the permission for the mount are 777. I need to change that to 770 on the top level directory and to 640 on the sub-directory .ssh/. But when I run chmod... (0 Replies)
Discussion started by: westmoreland
0 Replies

2. UNIX for Dummies Questions & Answers

Change unix permission when I don't own the file

Hi, A file is transferred from a Windows server(say username : user1) to Unix server via ftp. In unix, the permission of the file for a user, say user2 will be "-rw-r-----". Since the user1 is the owner of the file, user2 is not able to change the file permission using chmod. Is there... (5 Replies)
Discussion started by: merin
5 Replies

3. UNIX for Dummies Questions & Answers

Change chmod on files in diff directories

I am looking for a small script to crawl through several directories and change a couple of files in each directory to read write status. Anyone have any ideas ? (5 Replies)
Discussion started by: zapper222
5 Replies

4. Shell Programming and Scripting

Can root user run chmod 000 permission shell script?

Hi, I have a shell script file which is set to access permission 000. When I login as root (sudo su) and try to run this script, I am getting the Permission denied error. I have read somewhere that root admin user can execute any kind of permission script. Then why this behavior? However, I can... (1 Reply)
Discussion started by: royalibrahim
1 Replies

5. Shell Programming and Scripting

Change Rights Recursive with chmod

Hello, i want just to change Rights for a few direcories anf files, but some directories must be exclude. How can i put the command chmod as chmod -R 755 * exclude toto tata where toto and tata are directories Could you help me for that or must I use the find command Thanks (2 Replies)
Discussion started by: steiner
2 Replies

6. Shell Programming and Scripting

File permission by chmod

Hi, I have a typical problem. Consider the scenario: Folder1 ------> Folder2 ------> File1 ------> Folder3 Above is my folder structure, currently the user group "other" has no permissions. I wish to give "read" permission for "others" to File1 using a single command. chmod -R... (5 Replies)
Discussion started by: animesh303
5 Replies

7. UNIX for Dummies Questions & Answers only permission

After creating a user do i verify if theres only read access on the account. If not read access would i enter chmod a-xw "username"? (2 Replies)
Discussion started by: bigben1220
2 Replies

8. AIX

Permission denied when rm or chmod

I got "Permission denied" error message when I rm or chmod a file. I'm the owner of the file "lice_20091123.tar". How can I solve this matter? lice@appl:/midasapp/lice> whoami lice lice@appl:/midasapp/lice> who am i guest pts/12 Nov 23 19:09 ( ... (3 Replies)
Discussion started by: kang
3 Replies

9. Shell Programming and Scripting

change file type to hidden using chmod command

I want to make a hidden file with chmod command. Example: I have a file name inputfile.txt -rw-r--r-- 1 xxxxxx xxxxxx 1388 Sep 12 05:41 inputfile.txt I want to hide that file using chmod command. Please tell me if it is possible or there is some other way to do this. Thanks... (2 Replies)
Discussion started by: rinku
2 Replies

10. UNIX for Advanced & Expert Users

change permission chmod

Hi, when I launch my perl script, I write on the shell: perl How I can can change the permission to write only: x to launch the program? (2 Replies)
Discussion started by: Minguccio75
2 Replies
Login or Register to Ask a Question