1834752 Members
2787 Online
110070 Solutions
New Discussion

Problem with ls!

 
Massimo_20
Frequent Advisor

Problem with ls!

Hi folks,
if i use ls with a normal user there is not output, but if i use ls by root the output is correct.
Thanks in advance.



29 REPLIES 29
Armin Feller
Honored Contributor

Re: Problem with ls!

Interesting ;-( What happens if you use 'ls -l' or 'll' ??? Occur this with all non-root USERS? Have you created a new local USER and test this?
Tom Geudens
Honored Contributor

Re: Problem with ls!

Hi,
Is this "normal" on the particular system, or has something happened after which this is the result ?
Might have something to do with the PATH-variable (which might define another ls for your ordinary users). Try :
"whereis ls" as the root-user and the same as another user. Any difference in the result ?

Regards,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Michael Tully
Honored Contributor

Re: Problem with ls!

What is the exact command and any messages?

$ ls
.unreadable

If this is the case, you don't have read access to the directory.

If not please provide the first few lines of out put from when 'root' is used. There could be a corrupted named file.
Anyone for a Mutiny ?
Umapathy S
Honored Contributor

Re: Problem with ls!

Massimo,
How do you say the output is correct. In which dir are you listing? Are the permissions correct? Does ls not working for any other user?

-Umapathy

Arise Awake and Stop NOT till the goal is Reached!
Massimo_20
Frequent Advisor

Re: Problem with ls!

i tried with ls -l and ll, but the result is the same. Every user different from root has the same problem.
Thanks a lot.
Armin Feller
Honored Contributor

Re: Problem with ls!

Please check the permissions of 'ls' and 'll', ...

root / >ll /sbin/ls
-r-xr-xr-x 1 bin bin 278528 Dec 12 1997 /sbin/ls
root / >ll /usr/bin/ls
-r-xr-xr-x 6 bin bin 356352 Dec 12 1997 /usr/bin/ls

Seams to be a problem in this way. Which 'ls' are you using /sbin/ls or /usr/bin/ls???
Darren Prior
Honored Contributor

Re: Problem with ls!

Hi,

Out of interest does echo * return anything for your users in whatever directory you are using?

regards,

Darren.
Calm down. It's only ones and zeros...
Massimo_20
Frequent Advisor

Re: Problem with ls!

Thanks for your suggestion,
the permissions in the directory are correct.
i'm sure there are files in the the directory
root read every file
thanks.
Massimo_20
Frequent Advisor

Re: Problem with ls!

hi darren,
i tried with echo * and files were listed corretly.
Thanks
Armin Feller
Honored Contributor

Re: Problem with ls!

What does 'll -a' tell us?

ERRORS:
attributes unavailable = file corrupted

The parameter list is too long = set kernel tunable large_ncargs_enabled to 1

unreadable = filename has too many characters

...

Don't know what that could be.
Massimo_20
Frequent Advisor

Re: Problem with ls!

when in use ls or ls -la there is not output and there is not error message!!!
the output is the same if i work ls in the directory without files!
Tom Geudens
Honored Contributor

Re: Problem with ls!

Hi,
Stupid remark probably, but have you tried executing
/usr/bin/ls
instead of just ls ?
Same result ?

Regards,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Darren Prior
Honored Contributor

Re: Problem with ls!

Ok, we know there are files in the dir because root can see them, and echo * shows them. So, either there is a problem with ls, or someone has aliased ls to something else.

As well as Tom's suggestion - what happens if you run /sbin/ls ?

regards,

Darren.
Calm down. It's only ones and zeros...
Massimo_20
Frequent Advisor

Re: Problem with ls!

If i use /usr/bin/ls the output is the same!
There is not alias called ls!!
Massimo_20
Frequent Advisor

Re: Problem with ls!

now i tried with find command, but the output is the same: only the root user list the file correctly!!! The other users not work correctly also with the find command!

Darren Prior
Honored Contributor

Re: Problem with ls!

Hi Massimo,

Can you cut and paste the output of the commands running as root and another user so we can see exactly what you mean for both ls and find. Also, can you show the permissions on the directory that you are looking at, and the directories above it.

At the moment we're working in the dark and are probably missing something obvious!

regards,

Darren.
Calm down. It's only ones and zeros...
Massimo_20
Frequent Advisor

Re: Problem with ls!

The output of the command in in attach.
Thanks!
Darren Prior
Honored Contributor

Re: Problem with ls!

Hi Massimo,

This doesn't appear to be a HP-UX server according to the output of your su command! Perhaps you could try the forums at http://www.sun.com/forums/
for further assistance.

regards,

Darren.
Calm down. It's only ones and zeros...
Massimo_20
Frequent Advisor

Re: Problem with ls!

yes!! the system is not hp-ux, but the question is general!!!
thank you very much for the your interest!
Robert-Jan Goossens
Honored Contributor

Re: Problem with ls!

Massimo,

Could you check the output from (# df -k .) as user root and user svplus in the directory /usr/users/svplus/OV ?

Robert-Jan.
Massimo_20
Frequent Advisor

Re: Problem with ls!

OK!
In attach the output for df -k .
Thanks!
Umapathy S
Honored Contributor

Re: Problem with ls!

Massimo,
This is just a shot. Check the /etc/passwd. By any chance do the user have a restricted shell.

Umapathy
Arise Awake and Stop NOT till the goal is Reached!
GK_5
Regular Advisor

Re: Problem with ls!

Is it for one particular directory or all directories. check permissions for /sbin/ls and /usr/bin/ls
IT is great!
Massimo_20
Frequent Advisor

Re: Problem with ls!

the permission is OK!!
the user have not a restrict shell!!

the question is very hard!!!
i checked everything that i thinked!!!!

......