LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-25-2021, 05:11 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
what is ls trying to tell me?


what is ls trying to tell me?
Code:
lt2a/sr /home2/sr 4> rm -fr bar foo
lt2a/sr /home2/sr 5> echo woot >bar
lt2a/sr /home2/sr 6> ln -s bar foo
lt2a/sr /home2/sr 7> ls -dl bar foo
/bin/ls: foo: No such file or directory
-rw-r--r-- 1 sr sr 5 May 25 18:03 bar
lrwxrwxrwx 1 sr sr 3 May 25 18:03 foo -> bar
lt2a/sr /home2/sr 8> ls -dl foo
/bin/ls: foo: No such file or directory
lrwxrwxrwx 1 sr sr 3 May 25 18:03 foo -> bar
lt2a/sr /home2/sr 9>
obviously, foo exists as well as bar that it points to.
 
Old 05-25-2021, 05:43 PM   #2
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
Works for me....

ls -dl bar foo
-rw-rw-r-- 1 jc jc 5 May 26 10:40 bar
lrwxrwxrwx 1 jc jc 3 May 26 10:40 foo -> bar
 
Old 05-25-2021, 05:47 PM   #3
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
Relevant part of strace ls -dl bar foo...

lstat("foo", {st_mode=S_IFLNK|0777, st_size=3, ...}) = 0
lgetxattr("foo", "security.selinux", 0x56520790d920, 255) = -1 ENODATA (No data available)
readlink("foo", "bar", 4) = 3


I'd be curious to see what strace sees....
 
2 members found this post helpful.
Old 05-26-2021, 05:22 PM   #4
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
stat foo
(A quick and easy post)

+1 strace!!!

I love puzzles, but another clue needed.
Anything special about the distro or file system?
Ideally, give us a way to reproduce it.
Does this only happen in one particularly unique environment?

(I'm n00bCuruous why different from typical message:
[no /bin/], ls: [1st error from stat(2) returning ENOENT] cannot access [quoted]'filename':
No such ... [same ls msg])
 
Old 05-26-2021, 09:57 PM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by cyent View Post
Relevant part of strace ls -dl bar foo...

lstat("foo", {st_mode=S_IFLNK|0777, st_size=3, ...}) = 0
lgetxattr("foo", "security.selinux", 0x56520790d920, 255) = -1 ENODATA (No data available)
readlink("foo", "bar", 4) = 3


I'd be curious to see what strace sees....
that part is different:

Code:
lstat("foo", {st_mode=S_IFLNK|0777, st_size=3, ...}) = 0
lgetxattr("foo", "security.selinux", 0x564ae75e11c0, 255) = -1 ENOENT (No such file or directory)
write(2, "/bin/ls: ", 9/bin/ls: )                = 9
write(2, "foo", 3foo)                      = 3
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
)                       = 1
readlink("foo", "bar", 4)               = 3
looks like it gets an unexpected error from lgetxattr() and outputs that and goes on. it should either ignore it or do something different.
 
Old 05-26-2021, 11:06 PM   #6
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
Hmmm... https://github.com/bazelbuild/sandboxfs/issues/100

Are you on an interesting and different filesystem?
 
1 members found this post helpful.
Old 05-26-2021, 11:19 PM   #7
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
Yup, ENOENT isn't coming from lstat() so file exists... so next most list is the listxattr handler on the VFS struct.... ie. You're using a file system that doesn't handle listxattr properly.

So the question is very much "which file system type is 'foo' on?"
 
1 members found this post helpful.
Old 05-28-2021, 10:38 AM   #8
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Skaperen View Post
what is ls trying to tell me?
Code:
lt2a/sr /home2/sr 4> rm -fr bar foo
lt2a/sr /home2/sr 5> echo woot >bar
lt2a/sr /home2/sr 6> ln -s bar foo
lt2a/sr /home2/sr 7> ls -dl bar foo
/bin/ls: foo: No such file or directory
-rw-r--r-- 1 sr sr 5 May 25 18:03 bar

...
Just out of curiosity, does it work differently if you issue:
Code:
\ls -dl bar foo
???
 
Old 06-05-2021, 07:04 PM   #9
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by cyent View Post
Yup, ENOENT isn't coming from lstat() so file exists... so next most list is the listxattr handler on the VFS struct.... ie. You're using a file system that doesn't handle listxattr properly.

So the question is very much "which file system type is 'foo' on?"
it's an old encfs file system intended to encrypt part of an ext4 file system. encfs is lousy >encryption< but it solved a difficult situation long ago when i had just one drive. my next plan is to use real encryption on the whole 2nd drive when i move to Xubuntu 20.04 or maybe 22.04. no more encfs for me.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Please tell me how to tell KDE to run plasma-desktop instead of plasma-netbook Kenny_Strawn Linux - Software 7 07-19-2010 07:32 PM
somebody can tell me why . tell me how i can slove this problem xiongzhongkai Linux - Newbie 4 08-26-2008 01:51 AM
LXer: A Microsoft Slur in the OOXML Saga -- Did I Tell You or Did I Tell You? - Updat LXer Syndicated Linux News 0 03-20-2008 01:10 PM
can you tell me what operting system the best for what i tell you here ? thanks SlackwareMan Linux - General 5 07-27-2004 02:24 PM
how to tell to kernel to stop trying installing a specific module? zeppelin Slackware 4 08-21-2003 05:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration