Unix/Linux Go Back    


UNIX for Beginners Questions & Answers If you're not sure where to post a Unix or Linux question, post it here. All unix and Linux beginners welcome in this forum!

File attributes ????

UNIX for Beginners Questions & Answers


Tags
attributes, file

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 4 Weeks Ago   -   Original Discussion by MuntyScrunt
MuntyScrunt's Unix or Linux Image
MuntyScrunt MuntyScrunt is offline
Registered User
 
Join Date: Nov 2017
Last Activity: 30 December 2017, 6:47 PM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
File attributes ????

I'm trying to sort out the charing of a problem folder, in the 'ls -l' list is shows as:


Code:
 d???????????? ? ?    ?          ?          ? Pi-Share

PiShare is the name of the directory, all the ??s make no sense to me at all, and no user (there are only two, pi and root) can make any changes to it.

It's the only directory out of many that has the problem.

I've tried chmod to change the atts, sudo su can't change anything or remove it, so I'm a bit confused.

Does anyone know how I can get rid of it so I can create it again?

Many thanks.

Last edited by MadeInGermany; 4 Weeks Ago at 09:08 AM.. Reason: added code tags
Sponsored Links
    #2  
Old Unix and Linux 4 Weeks Ago   -   Original Discussion by MuntyScrunt
jim mcnamara's Unix or Linux Image
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 15 January 2018, 9:34 AM EST
Location: NM
Posts: 11,284
Thanks: 581
Thanked 1,127 Times in 1,038 Posts


Code:
ls -ld Pi-share | od -c

Please post the output of the above command. What UNIX are you using?

It looks like the file system itself is corrupted. We may have to resort to a tool like fsck.
Sponsored Links
    #3  
Old Unix and Linux 4 Weeks Ago   -   Original Discussion by MuntyScrunt
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is online now Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 19 January 2018, 4:20 AM EST
Location: Simplicity
Posts: 3,940
Thanks: 333
Thanked 1,316 Times in 1,186 Posts
Just ls -ld Pi-share will show a missing x-bit.
ls may read the directory contents with the file names, but may not access the inodes of the files with the attributes and a link to the data.
It is a bug (or feature?) in GNU ls to then show ???? for the attributes.
In contrast, Unix ls and old GNU ls say "filename: permission denied" on stderr and nothing on stdout.
    #4  
Old Unix and Linux 4 Weeks Ago   -   Original Discussion by MuntyScrunt
jim mcnamara's Unix or Linux Image
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 15 January 2018, 9:34 AM EST
Location: NM
Posts: 11,284
Thanks: 581
Thanked 1,127 Times in 1,038 Posts
I think the file system is hosed - and the directory permissions are history. GNU ls displays ? for unprintable characters in the locale. I believe.
Sponsored Links
    #5  
Old Unix and Linux 4 Weeks Ago   -   Original Discussion by MuntyScrunt
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is online now Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 19 January 2018, 4:20 AM EST
Location: Simplicity
Posts: 3,940
Thanks: 333
Thanked 1,316 Times in 1,186 Posts
I give an example, so everybody can reproduce.


Code:
mkdir newdir
touch newdir/file1
touch newdir/file2
chmod -x newdir

Unix (and very old GNU ls/glibc)


Code:
ls -l newdir
newdir/file2: Permission denied
newdir/file1: Permission denied
total 0

Old GNU ls


Code:
ls -l newdir
total 0
?--------- ? ? ? ?            ? file1
?--------- ? ? ? ?            ? file2

GNU ls


Code:
ls -l newdir
ls: cannot access newdir/file2: Permission denied
ls: cannot access newdir/file1: Permission denied
total 0
-????????? ? ? ? ?            ? file1
-????????? ? ? ? ?            ? file2

The Following 2 Users Say Thank You to MadeInGermany For This Useful Post:
Corona688 (4 Weeks Ago), RudiC (4 Weeks Ago)
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to remove attributes of a file? yifangt UNIX for Dummies Questions & Answers 6 07-04-2014 06:29 PM
file attributes and exception krem UNIX Desktop Questions & Answers 1 09-03-2006 09:45 PM
file attributes Hitori Shell Programming and Scripting 1 07-12-2006 04:12 PM
file attributes hytechpro Shell Programming and Scripting 2 09-16-2005 10:32 AM
rcp and file attributes jhansrod Shell Programming and Scripting 2 05-26-2005 12:28 PM



All times are GMT -4. The time now is 05:45 AM.