Post subject: Can't delete file
PostPosted: Wed Nov 04, 2009 6:00 pm 
   
Trying to clear out unwanted files from my networked backup-device, a
Buffalo LinkStation mounted as a cifs device:
//192.168.0.6/data /mnt/nasdata cifs rw,mand 0 0
As root, I managed to delete a whole load of stuff, but one file
stubbornly refuses to go:

[root@Mozart Lesley]# ls -l
total 1024
-rwxrwSrwx 1 root root 18602 2009-11-03 15:17 TBABO~6H.ODS*
No idea what the upper-case S means, and no amount of chmod-ing can
change it. The file name is highlighted brown: where are the colours
defined?

When I try to delete it from the command-line, I get:
[root@Mozart Lesley]# /bin/rm TBABO~6H.ODS
/bin/rm: cannot remove `TBABO~6H.ODS': No such file or directory
Can someone suggest how I can delete it please?
--
Grimble
Registered Linux User #450547
Running KDE:4.3.2 on 2.6.29.6-desktop586-2mnb kernel.
Mandriva Linux release 2009.1 (Official) for i586


 
 Post subject: Re: Can't delete file
PostPosted: Wed Nov 04, 2009 6:00 pm 
On Wed, 04 Nov 2009 10:00:53 +0000, Grimble wrote:

Quote:
[root@Mozart Lesley]# ls -l
total 1024
-rwxrwSrwx 1 root root 18602 2009-11-03 15:17 TBABO~6H.ODS*
No idea what the upper-case S means,

I think it is called a sticky bit, :)
but I can not find any documentation on an upper-case S.

Quote:
and no amount of chmod-ing can change it.

Could be caused by a setting in /etc/exports on the target node.
Then again guessing it is caused by the same problem as you are having
trying to remove it.

Quote:
The file name is highlighted brown: where are the colours
defined?

I'll guess /etc/DIR_COLORS


Quote:
When I try to delete it from the command-line, I get:
[root@Mozart Lesley]# /bin/rm TBABO~6H.ODS
/bin/rm: cannot remove `TBABO~6H.ODS': No such file or directory
Can someone suggest how I can delete it please?

I would try single, then double quote, and finally wild card
rm 'TBABO~6H.ODS'
rm "TBABO~6H.ODS"
rm TBABO*


 
 Post subject: Re: Can't delete file
PostPosted: Wed Nov 04, 2009 7:48 pm 
On Wed, 04 Nov 2009 13:32:19 -0600, Moe Trin wrote:
Quote:
but I can not find any documentation on an upper-case S.

Not in man ls?

Frap, not in man ls, but over in info ls on Mandrvia Linux.

The file mode bits listed are similar to symbolic mode
specifications ( Symbolic Modes). But `ls' combines
multiple bits into the third character of each set of permissions
as follows:


`s'
If the set-user-ID or set-group-ID bit and the corresponding
executable bit are both set.


`S'
If the set-user-ID or set-group-ID bit is set but the
corresponding executable bit is not set.


`t'
If the restricted deletion flag or sticky bit, and the
other-executable bit, are both set. The restricted deletion
flag is another name for the sticky bit. Mode
Structure.


`T'
If the restricted deletion flag or sticky bit is set but the
other-executable bit is not set.


`x'
If the executable bit is set and none of the above apply.


 
 Post subject: Re: Can't delete file
PostPosted: Thu Nov 05, 2009 3:32 am 
On Wed, 4 Nov 2009, in the Usenet newsgroup alt.os.linux.mandriva, in article
, Bit Twister wrote:

Quote:
Grimble wrote:

[root@Mozart Lesley]# ls -l
total 1024
-rwxrwSrwx 1 root root 18602 2009-11-03 15:17 TBABO~6H.ODS*
No idea what the upper-case S means,

SGID but not executable by group

Quote:
I think it is called a sticky bit, :)

No, the 'sticky bit' is the 'other execute' bit - look at the
permissions on /tmp/ or /var/tmp

[compton ~]$ ls -ld /tmp/
drwxrwxrwt 3 root root 16384 Nov 4 12:11 /tmp/
[compton ~]$

That shows up as the 't' rather than 'x' on the last permission.

Quote:
but I can not find any documentation on an upper-case S.

Not in man ls? Hmmm... OK

[compton ~]$ touch FOO
[compton ~]$ ls -l FOO
-rw-r--r-- 1 ibuprofi users 0 Nov 4 12:19 FOO
[compton ~]$ chmod 755 FOO
[compton ~]$ ls -l FOO
-rwxr-xr-x 1 ibuprofi users 0 Nov 4 12:19 FOO
[compton ~]$ chmod 2755 FOO
[compton ~]$ ls -l FOO
-rwxr-sr-x 1 ibuprofi users 0 Nov 4 12:19 FOO
[compton ~]$ chmod 2745 FOO
[compton ~]$ ls -l FOO
-rwxr-Sr-x 1 ibuprofi users 0 Nov 4 12:19 FOO
[compton ~]$

Quote:
When I try to delete it from the command-line, I get:
[root@Mozart Lesley]# /bin/rm TBABO~6H.ODS
/bin/rm: cannot remove `TBABO~6H.ODS': No such file or directory

Above, you showed the filename as 'TBABO~6H.ODS*' so the star on the
end _may_ be part of the full name (I _hate_ distributions that set
the 'let me help you, you are to stupid to figure this out' aliases).
I don't use 'cifs' - but could this be an ACL problem?

Quote:
I would try single, then double quote, and finally wild card
rm 'TBABO~6H.ODS'
rm "TBABO~6H.ODS"
rm TBABO*

rm TBABO (that is, press the Tab key at that point) and let
the shell expand the filename. I'd also try '/bin/ls -lb' or
'bin/ls -lq' either of which will show non-printing characters. Using
'/bin/ls' rather than 'ls' also gets around the annoying alias.

Old guy


 
 Post subject: Re: Can't delete file
PostPosted: Fri Nov 06, 2009 3:41 am 
On Wed, 4 Nov 2009, in the Usenet newsgroup alt.os.linux.mandriva, in article
, Bit Twister wrote:

Quote:
Moe Trin wrote:

but I can not find any documentation on an upper-case S.

Not in man ls?

Frap, not in man ls, but over in info ls on Mandrvia Linux.

A quick scan through several UNIX 'ls' man pages doesn't show it
either, but it _used_ to be in one of them (with advancing age,
memory is the second thing to "go"). Another place where it's
(poorly) explained is in 'man chmod'.

The mode or permissions can be set/read as letters (rSsTtwx) or
by octal numerics (1=x 2=w 4=r -> 6 = rw-) using three (u g o) or
four (s u g o - where s 1=Sticky, 2=SGID, 4=SUID) digits, and once
you've used either a dozen or so times, it's burnt into your memory.
The chmod command accepts either terminology, and has one rarely
used but highly useful extra - the 'X' permission (set execute if a
directory, or if any user has execute permission). Rarely used, and
I'm more likely to use 'find' with -type -perm -exec chmod options
instead, but it can be _very_ handy when trying to fix the result of
a mis-typed 'chmod -R' command.

Old guy


 





SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list
 © 0x61.com 2009 - Internet Forums and much more! - All rights reserved.