[Solved] Retrieve all the permission of the /bin folder


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [Solved] Retrieve all the permission of the /bin folder
# 1  
Old 09-01-2012
[Solved] Retrieve all the permission of the /bin folder

hello friends,

By mistake I have run find / -type f -exec chmod 644 {} \;

now all permission has been chaged of /bin
I am not able to change the permission. I am working on the virtuozzo VPS.

Is their any way to retrieve the permission to 770 to /bin
Note /bin/chmod also not executing

Please help me.

Last edited by Scott; 09-01-2012 at 10:36 AM.. Reason: Moved to own thread.
# 2  
Old 09-01-2012
"chmod" is probably not executing because it has already been hit by "chmod 644" and has now its executable status revoked.

You can try to use "install", which can copy a file to some destination and set its file mode in the process. It might have not beeen hit by your command AND it might not make use of the "chmod" executable (i am not sure about this, but it is worth a try).

If this doesn't work your best bet is to mount the filesystem in question on another (equivalent) system and use "install" or "chmod" from there to recreate the filemodes. You could write a script which cycles through all the files mounted under "/", reads the filemode of every file and applies this on the respective file at "/where/your/fs_is_mounted".

It might be faster to just restore the last backup in this case.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 3  
Old 09-01-2012
Thank you for graceful reply,

The issue has been resolved . I have changed the file permissions from the main node where the files of the containers were mounted. Now the VPS is running fine

Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Retrieve the Latest file in a folder using SFTP

HI Guys, Can anyone help me to retrieve the latest file from below example using SFTP I have below list of files in a folder v403t.lstprgms.sortin1 val027.d099.fwest.oct2711 xcelrptd.d1400sqp.dec1713.t040459.@02del xcelrptd.d1400sqp.dec1713.t073308.@02del... (3 Replies)
Discussion started by: heye18
3 Replies

2. AIX

Why /bin/su permission with SUID?

Dear all experts in this forum, I have faced a audit issue as auditor told that we should not have SUID on /bin/su. As I have checked using Google, I found most of the site only telling that /bin/su should have the permission bit as -rwsr-xr-x but never explain why /bin/su need this permission... (4 Replies)
Discussion started by: kwliew999
4 Replies

3. Shell Programming and Scripting

How to download recursively a folder using /usr/bin/ftp and cshell?

Hi, friends, I am meet a ftp download problem when using cshell and /usr/bin/ftp command. I want to download recursively a folder dira from FTP server. dira ---dira1-----dira2------dira3-----dira4 |--file11 |--file21 |--file31 |--file41 |--file12 |--file22 |--file32 ... (1 Reply)
Discussion started by: weichanghe2000
1 Replies

4. UNIX for Dummies Questions & Answers

Can I retrieve 'My Office' folder on EeePC901?

I have a problem with my netbook (Linux o.s.) I was deleting a few photos from inside 'My Office' folder when entire folder disappeared. Not just the files, the entire folder. This has never happened before and I have lost the files I was working on, as I carelessly didn't 'back up' as I went... (3 Replies)
Discussion started by: CrystalB
3 Replies

5. HP-UX

Folder permission

Hi guys, When I switch my user. I cant go to one of the folders. seems that this user has no right to access the folder. can you please help me to give the right to this user in order for him to access to the folder? it gives me permission denied. (2 Replies)
Discussion started by: messi777
2 Replies

6. Shell Programming and Scripting

How to create executable file just like in folder /bin?

I know shell is an interpreter language, but can I make an executable file just like in folder /bin, /usr/bin, etc which source code was from a .sh file or from some .sh files?? My main purpose is to hide the source code. thanks. (1 Reply)
Discussion started by: 14th
1 Replies

7. Red Hat

/bin strange permission, corrupted? [solved]

Hi I think my /bin is corrupted which is why I can’t boot my server.. Anyone knows what below file permission means? # ls -l /mnt/sysimage | grep bin drwxr-xr-x 2 root root 12288 Sep 29 11:23 sbin ?r--rw-x 41112 16694 1305152 0 Feb 10 2055 bin Tried overwriting, deleting,chmod,chown but... (0 Replies)
Discussion started by: halacil
0 Replies

8. OS X (Apple)

I accidentally changed to only write permission on /usr/bin... please Help!

I accidentally changed to sudo chmod a=w to my /usr/bin folder on my macbook with OS 10.5.8... Please help! I can't even get into a terminal correctly cause it displays: -bash: uname: command not found -bash: cut: command not found -bash: uname: command not found -bash: cut: command not found... (6 Replies)
Discussion started by: scaryMac23
6 Replies

9. Solaris

/usr/bin has been changed with 777 permission

Hello Guruz, Relay bad condition :mad: Some has changed the permission to 777 recursively for /usr/bin directory by mistake. Now all the permission looks to be 777 on /usr/bin Hence I am so many system related errors as 1 show below. When I am trying to change the password, I am getting... (5 Replies)
Discussion started by: bullz26
5 Replies

10. Shell Programming and Scripting

/bin/sh: bad interpreter: Permission denied

today i started the LFS book (version 4.0). Basically i am using slackware 9.0 to try and install a new linux completely from source on another partition. Now i took the book's recommendations and created a user called lfs so i wouldn't have to do the stuff as root, and i have got the new LFS... (4 Replies)
Discussion started by: Calum
4 Replies
Login or Register to Ask a Question