LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-22-2004, 01:37 PM   #1
fisheromen1031
Member
 
Registered: Jun 2004
Location: Lone Star State
Distribution: WinXP Pro, Puppy Linux, Ubuntu Warty & Hoary
Posts: 46

Rep: Reputation: 15
Question restore user permissions


I used chmod -R a-w <directory> so that i wouldn't accidentally change the data in the file by typing some command. now when i use ls, it tells me permission denied. How can i get access to my directory back?

God Bless,
fisher

Last edited by fisheromen1031; 07-22-2004 at 01:42 PM.
 
Old 07-22-2004, 01:56 PM   #2
fisheromen1031
Member
 
Registered: Jun 2004
Location: Lone Star State
Distribution: WinXP Pro, Puppy Linux, Ubuntu Warty & Hoary
Posts: 46

Original Poster
Rep: Reputation: 15
Talking here's the solution

Ok! I figured out what I did; so I will write this for anyone else who makes the same mistake.

after using chmod -R a-w <Dir>, I noticed that on invocation of ls all my files where highlighted and had x's in the permissions. I invoked chmod -R a-x to solve the problem ( and apparently to create a worse one). Apparently when you invoke the recursive -R on the directory it changes the permissions for the directory before changing permissions of its files. Additionally, without x permissions for the directory, you cannot access any of its files.
So do you see the solution yet? Here it is:
In a different directory invoke chmod a+x <Dir>;
then from <Dir>, chmod a-x ./*
(or from the other directory chmod a-x <Dir>/*)

Have a blessed day,
fisher
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP: Restore etc files permissions gollum26 Linux - Security 5 09-15-2004 06:06 PM
how to restore my files permissions ? Punker51 Linux - Software 1 12-05-2003 06:24 AM
Restore default permissions scotcro Linux - Newbie 1 01-21-2003 10:13 PM
how to restore the default permissions safrout Linux - General 4 10-21-2002 09:53 AM
Linux permissions restore once Linux - Newbie 2 06-18-2002 03:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration