Home Man
Today's Posts

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

attributes, file

Login to Reply

Thread Tools Search this Thread
# 1  
Old 12-20-2017
File attributes ????

I'm trying to sort out the charing of a problem folder, in the 'ls -l' list is shows as:
 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
# 2  
Old 12-20-2017
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.
# 3  
Old 12-20-2017
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
I think the file system is hosed - and the directory permissions are history. GNU ls displays ? for unprintable characters in the locale. I believe.
# 5  
Old 12-21-2017
I give an example, so everybody can reproduce.
mkdir newdir
touch newdir/file1
touch newdir/file2
chmod -x newdir

Unix (and very old GNU ls/glibc)
ls -l newdir
newdir/file2: Permission denied
newdir/file1: Permission denied
total 0

Old GNU ls
ls -l newdir
total 0
?--------- ? ? ? ?            ? file1
?--------- ? ? ? ?            ? file2

GNU ls
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)
Login to Reply

« Previous Thread | Next Thread »
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
Split file based on multi valued attributes snukala Solaris 7 02-06-2011 01:16 AM
Using cp: preserving file/folder attributes and auto creating folders pcwiz Shell Programming and Scripting 1 08-11-2009 04:19 PM
Generate the File Attributes in the system saurabhchokshi Shell Programming and Scripting 3 06-12-2009 06:58 PM
file attributes and exception krem UNIX Desktop Questions & Answers 1 09-03-2006 08:45 PM
Assigning file attributes to variables olimiles Shell Programming and Scripting 5 08-18-2006 09:31 AM
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
Need to view all the attributes for a file/node dpalmer UNIX for Advanced & Expert Users 2 10-02-2001 11:10 PM

All times are GMT -4. The time now is 04:06 PM.

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