LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-01-2003, 01:19 PM   #1
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Problem moving directory - invisible bits?


This is bizarre. Burn files and directories to CD from Windows. Copy them to Slack. Because the files show as executable, chown and chmod them as appropriate.
Code:
drwx------    2 j        users         608 Oct  3 05:16 AC-DC 1977 Let There Be Rock
Try to move them with gentoo. Permission denied, error code 13. Well, a search tells me that means '#define EACCESS' or something but now what? Try it from aterm. Permission denied. Look inside the directory and see the *files* are gone. The directory just won't go. 'chmod' and 'chown' again just to be sure. 'rm' 'rm -r' 'rm -rf' 'rmdir' 'mv'. Ditto. As root, 'rm -r $DIR' works. As user 'cp' works.

I would suspect an arcane 'sticky bit' or something but how the hell did it get set? Why does't it show? How to get rid of it? How can I 'chmod' and 'chown' and 'ls' and 'cp' a directory that I own, yet can't move or remove it?

PS - I'm trying to move them to and from the same partition, so that's not it.

I've just had a bunch of crap sitting on an XP filesystem and not really caring - mp3s I'd ripped, when ripping oggs on Linux was giving me stuff to listen to. But now that I'm trying to integrate them I'm having *all kinds* of problems.

I've rebooted Windows on the Celeron and I'm just going to retag them, rename them, tar them up this time, and re-burn them - hopefully when I untar them on the Athlon they'll be cooperative? Still curious about what the hell is going on, though. Can't figure out if I'm making a bonehead tyro mistake or if there's some obscure flaw somewhere. Don't want it to happen again, though.
 
Old 12-01-2003, 01:27 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Umm ... what are the permissions on the files
in the directory?

Cheers,
Tink
 
Old 12-01-2003, 01:31 PM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Original Poster
Rep: Reputation: Disabled
600 - and those delete without problem when I try to remove the directory - just the directory stays. I also thought about there maybe being hidden files in the directory but 'ls -a/A' didn't turn anything up.
 
Old 12-01-2003, 02:39 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Just out of despair ... what happens if you try to
move it from within mc?

I have to admit that I am stunned :}

Cheers,
Tink
 
Old 12-01-2003, 03:17 PM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Original Poster
Rep: Reputation: Disabled
mc - select dir - F6
'Move foo to foobar?' *enter*
'Cannot move directory foo'
'Permission denied (13)'

cd into directory - select file - F6
'Move foo to foobar?' *enter*
*moves*

Aigh!
 
Old 12-01-2003, 04:00 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,999
Blog Entries: 54

Rep: Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745
...and "ls -dl $(dirname <dir>)"? If the dir <dir> is in doesn't allow writes, then deleting the subdir will not work.

Last edited by unSpawn; 12-01-2003 at 04:03 PM.
 
Old 12-01-2003, 04:06 PM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Original Poster
Rep: Reputation: Disabled
Solid dashes, but the same for the directory and for the files in it (without the -d). I use reiser - is that an ext2 special, or generally applicable?

--Oops. Didn't see your edit - lemme check...

-- I think that's it. 'ls -dl' on the directory I'm trying to delete shows it right. But on the directory containing it, it's got read and execute permission but no write. So that's how I can copy and list and so on, but not delete/move. The directories above that go back to read and write. But how'd it get that way? And I should start hunting for the fix myself now, but I'm frazzled - would chattr do it, or is there a weird switch to 'chmod'?

Last edited by slakmagik; 12-01-2003 at 04:20 PM.
 
Old 12-01-2003, 04:23 PM   #8
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Original Poster
Rep: Reputation: Disabled
Hell, I'm just making a new post - 4 edits is ridiculous. It almost made sense to me but, if I don't have write access (and how do 'ls -l' from above and 'ls -dl' inside, show different perms?) and that's why I can't delete the directory - how can I delete the files? Seems like that wouldn't be permitted, either.

*utterly confused*
 
Old 12-01-2003, 04:52 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,999
Blog Entries: 54

Rep: Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745
Chattr/lsattr work on/list extended attributes. If you/anything else doesn't use them they won't get set/listed. Files within a dir are entries in the list of that dir, subdirs are listed in their parent dir list. So to be able to delete files the dir they're in should have write set, and to delete a dir inside a dir, the parent dir needs write set.
 
Old 12-01-2003, 05:11 PM   #10
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Original Poster
Rep: Reputation: Disabled
Ah. So in dir/subdir/file there's a list 'file' is on in 'subdir' and the files are writeable, so I can delete them. But in 'dir', there's a list of subdir's that are *not* writeable, so I can't move *them*. That much makes sense now.

Thanks - I appreciate the help, both of you.

-- Wait. But I did that. ls -l above a dir list and ls -dl in the directory are the same thing. I think. I had write permission all the way through doing 'ls -l' - only 'ls -dl' showed anything different. And now when I relist them as 'ls -l' from above, they show as *not* writeable. And *now* chmod works...

Okay, I'm just going to go drool in a corner for awhile. But thanks - whatever it is, it works now.

Last edited by slakmagik; 12-01-2003 at 05:17 PM.
 
  


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
Directory with .htaccess is invisible?! Barca Linux - General 5 02-23-2005 12:28 PM
Invisible Directory 900i Mandriva 6 12-09-2004 03:26 PM
X11 directory invisible? astrowill Linux - Newbie 3 07-22-2004 12:46 PM
problem moving directory sanjith11 Linux - Software 4 06-02-2004 07:06 AM
invisible directory prowlerxpla Linux - Software 1 09-11-2003 09:50 AM


All times are GMT -5. The time now is 11:53 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration