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 12-20-2017   -   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; 12-21-2017 at 08:08 AM.. Reason: added code tags
Sponsored Links
    #2  
Old Unix and Linux 12-20-2017   -   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: 20 April 2018, 12:00 AM EDT
Location: NM
Posts: 11,351
Thanks: 602
Thanked 1,152 Times in 1,061 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 12-20-2017   -   Original Discussion by MuntyScrunt
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 20 April 2018, 2:00 AM EDT
Location: Simplicity
Posts: 4,032
Thanks: 346
Thanked 1,356 Times in 1,222 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 12-20-2017   -   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: 20 April 2018, 12:00 AM EDT
Location: NM
Posts: 11,351
Thanks: 602
Thanked 1,152 Times in 1,061 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 12-21-2017   -   Original Discussion by MuntyScrunt
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 20 April 2018, 2:00 AM EDT
Location: Simplicity
Posts: 4,032
Thanks: 346
Thanked 1,356 Times in 1,222 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 (12-21-2017), RudiC (12-21-2017)
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 05:29 PM
file attributes and exception krem UNIX Desktop Questions & Answers 1 09-03-2006 08:45 PM
file attributes Hitori Shell Programming and Scripting 1 07-12-2006 03:12 PM
file attributes hytechpro Shell Programming and Scripting 2 09-16-2005 09:32 AM
rcp and file attributes jhansrod Shell Programming and Scripting 2 05-26-2005 11:28 AM



All times are GMT -4. The time now is 03:21 AM.