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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-31-2006, 03:10 PM
|
#1
|
Member
Registered: Mar 2004
Location: boulder, co
Distribution: slack 12, debian 4, ubuntu server 6.10
Posts: 68
Rep:
|
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
|
|
|
01-31-2006, 03:22 PM
|
#2
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep:
|
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 03:24 PM.
|
|
|
01-31-2006, 03:31 PM
|
#3
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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
|
|
|
01-31-2006, 03:35 PM
|
#4
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
01-31-2006, 07:01 PM
|
#5
|
Member
Registered: Mar 2004
Location: boulder, co
Distribution: slack 12, debian 4, ubuntu server 6.10
Posts: 68
Original Poster
Rep:
|
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
|
|
|
01-31-2006, 07:04 PM
|
#6
|
Senior Member
Registered: Aug 2005
Posts: 1,755
Rep:
|
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 07:05 PM.
|
|
|
01-31-2006, 07:56 PM
|
#7
|
Member
Registered: May 2005
Location: Winnipeg, Canada
Distribution: mostly mepis
Posts: 427
Rep:
|
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.
|
|
|
01-31-2006, 08:16 PM
|
#8
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
01-31-2006, 11:59 PM
|
#9
|
Member
Registered: May 2005
Location: Winnipeg, Canada
Distribution: mostly mepis
Posts: 427
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:49 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|