LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-31-2006, 02:10 PM   #1
moschi
Member
 
Registered: Mar 2004
Location: boulder, co
Distribution: slack 12, debian 4, ubuntu server 6.10
Posts: 68

Rep: Reputation: 15
chmod & now files don't work?


i did a "chmod -R 664 /home/andrew/pics"
& now they are all screwed up:

[andrew@localhost ~]$ ls -l /home/andrew/pics
total 0
?--------- ? ? ? ? ? 2001-12-30
?--------- ? ? ? ? ? 2002-02-17
etc...
?--------- ? ? ? ? ? IMGP0141.JPG
?--------- ? ? ? ? ? IMGP0192.JPG
?--------- ? ? ? ? ? IMGP0195.JPG
etc...


any clue what happened & is it possible to get them back or did i just throw out 3000 pics?

thanks
 
Old 01-31-2006, 02:22 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
try

chown -R andrew:andrew /home/andrew/pics
chmod -R +rw /home/andrew/pics

and see if that changes anything..I only wonder how on earth you could get "?---------", meaning that where the heck did you get that question mark there? sounds more than odd..

EDIT: you could also try (as root) to change the owner of the files to another user, say root, and chmod, and then change it back to "andrew"..just to make sure. but anyway this is the first time in my life I see something like this happens..

Last edited by b0uncer; 01-31-2006 at 02:24 PM.
 
Old 01-31-2006, 02:31 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
3000 pictures--I hope they are backed up....

Can you open one of the files?

If no backup, then DO NOT write anything to that disk until you figure out what is happening. The files are very likely recoverable
 
Old 01-31-2006, 02:35 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by moschi
i did a "chmod -R 664 /home/andrew/pics"
& now they are all screwed up:

[andrew@localhost ~]$ ls -l /home/andrew/pics
total 0
?--------- ? ? ? ? ? 2001-12-30
?--------- ? ? ? ? ? 2002-02-17
etc...
?--------- ? ? ? ? ? IMGP0141.JPG
?--------- ? ? ? ? ? IMGP0192.JPG
?--------- ? ? ? ? ? IMGP0195.JPG
etc...


any clue what happened & is it possible to get them back or did i just throw out 3000 pics?

thanks
What file-system are you using?

I don't think that the chmod command would have done that,
there's got to be something wrong with the media or a major
file-system corruption.


Cheers,
Tink
 
Old 01-31-2006, 06:01 PM   #5
moschi
Member
 
Registered: Mar 2004
Location: boulder, co
Distribution: slack 12, debian 4, ubuntu server 6.10
Posts: 68

Original Poster
Rep: Reputation: 15
i did
chown -R andrew:andrew /home/andrew/pics
chmod -R +rw /home/andrew/pics

& then they worked for root. if i did an "ls -l" as root it would show up fine, the files would open with eog/gimp/gthumb/whatever... but they would not work for any other user, and an "ls -l" would show up like above. tried changing to another user & back, changing permissions back & forth, but got nothing... finally i scp'ed the entire folder to my other computer, where i changed permissions to a user on that one, then brought them back with scp as andrew on the problem computer & now they work.

so i'm not really sure what happened, or what there fixed it, but it works now.

& ya, most of them were backed up. last backup was about a month ago, but they work now... really odd.

thanks,
andrew
 
Old 01-31-2006, 06:04 PM   #6
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Directories need to be Executable! It is execute permission that allows you to access stuff inside a directory; without execute permission you cannot do anything. "664" has not execute permission for anyone, and "+rw" won't help.

Last edited by spooon; 01-31-2006 at 06:05 PM.
 
Old 01-31-2006, 06:56 PM   #7
muddywaters
Member
 
Registered: May 2005
Location: Winnipeg, Canada
Distribution: mostly mepis
Posts: 427

Rep: Reputation: 30
Was about to start a thread when I spotted this one. Hope you don't mind the intrusion moschi.
I was trying to change permission on a directory so the directory is 755 but the files are 644. The line asuggested on one site was;
chmod -R a+rX /foo
Is something wrong with that syntax? It didn't work. I am the owner of the directory.
 
Old 01-31-2006, 07:16 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Should work (have worked) [unless of course the file-system doesn't
have support for Linux-features (e.g. if you were using FAT)].


Cheers,
Tink
 
Old 01-31-2006, 10:59 PM   #9
muddywaters
Member
 
Registered: May 2005
Location: Winnipeg, Canada
Distribution: mostly mepis
Posts: 427

Rep: Reputation: 30
Quote:
Originally Posted by Tinkster
Should work (have worked) [unless of course the file-system doesn't
have support for Linux-features (e.g. if you were using FAT)].
The directory holds a DOS game so I guess thats the answer. Permissions can be changed on the files one by one but not recursively. Seems strange. Does the learning never end?

Thanks for the reply.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chmod recursion -- files only Risc91 AIX 16 09-28-2016 11:15 AM
chmod deleted my files NonSumPisces Linux - Newbie 14 09-22-2007 11:37 PM
Japanese canna won't work : Warning: かな漢字変&am OrganicOrange84 Debian 3 06-30-2005 02:28 PM
chmod recursive on files on dlublink Linux - Newbie 6 03-02-2005 08:45 AM
chmod doesn't work stonecrest Linux - Newbie 4 02-27-2005 04:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:30 AM.

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