LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-11-2006, 02:32 PM   #1
elektronaut
LQ Newbie
 
Registered: Nov 2006
Distribution: Ubuntu Edgy
Posts: 12

Rep: Reputation: 0
Strange directory issue


Hi,

I was using the program easytag and at the same time was calling 'sudo chmod -R 644 audio/' as some files had the wrong bits set. The next listing gave me this:
Code:
ls -la audio/
insgesamt 0
?--------- ? ? ? ?                ? audio/.
?--------- ? ? ? ?                ? audio/..
?--------- ? ? ? ?                ? audio/flac
?--------- ? ? ? ?                ? audio/mp3
?--------- ? ? ? ?                ? audio/ogg
I can't enter the directories anymore. Is there a possibility to restore the directories?
[EDIT:] O.K., now I know about the consequences of playing around on the command line... The chmod apparently removed the necessary executable flag for the directories. Is there some way to set it back recursively, excluding files?

Last edited by elektronaut; 12-11-2006 at 03:46 PM.
 
Old 12-11-2006, 03:58 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
How about

sudo chmod 755 audio
sudo chmod 755 audio/flac
sudo chmod 755 audio/mp3
sudo chmod 755 audio/ogg

etc..
etc..

and DON"T do that in the future..

Last edited by farslayer; 12-11-2006 at 04:02 PM.
 
Old 12-11-2006, 04:24 PM   #3
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

Try:
Code:
sudo chown -R <yourUserName> audio/
sudo chmod -R u+Xrw audio/
That should make yourUserName the owner and make all files readable and writable. It'll also add the executable bit for the directories only. All recursively.
 
Old 12-12-2006, 03:41 AM   #4
elektronaut
LQ Newbie
 
Registered: Nov 2006
Distribution: Ubuntu Edgy
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ilikejam
Code:
sudo chmod -R u+Xrw audio/
Cool! I wasn't aware of the possibility of using a capital 'X'. Really should read man pages more thoroughly
Thanks a lot, guys!
 
  


Reply



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
What is this strange directory tekmann33 Linux - Newbie 3 11-15-2006 01:57 PM
strange directory behavior exodist Linux - Software 1 11-20-2005 04:37 PM
strange c issue exvor Programming 8 01-29-2005 02:23 PM
strange computername issue classon Linux - Newbie 16 10-30-2003 04:56 PM
help me on a strange issue. newpenguin Linux - General 11 10-06-2002 03:42 PM

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

All times are GMT -5. The time now is 06:00 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
Open Source Consulting | Domain Registration