×
UNIX.COM Login
Username:
Password:  
Show Password






👤


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 ????

Tags
attributes, file

👤 Login to reply

 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-20-2017
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 12-20-2017
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 15 July 2018, 10:19 PM EDT
Location: NM
Posts: 11,435
Thanks: 636
Thanked 1,174 Times in 1,081 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 12-20-2017
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 16 July 2018, 7:08 AM EDT
Location: Simplicity
Posts: 4,153
Thanks: 365
Thanked 1,418 Times in 1,274 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 12-20-2017
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 15 July 2018, 10:19 PM EDT
Location: NM
Posts: 11,435
Thanks: 636
Thanked 1,174 Times in 1,081 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 12-21-2017
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 16 July 2018, 7:08 AM EDT
Location: Simplicity
Posts: 4,153
Thanks: 365
Thanked 1,418 Times in 1,274 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
👤 Login to reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:47 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.