[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in [ -f file ] test
From: |
Chet Ramey |
Subject: |
Re: bug in [ -f file ] test |
Date: |
Wed, 27 Jul 2016 18:33:34 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 7/27/16 3:34 PM, László Házy wrote:
> You have probably not done the first command: "[user1]$ chmod g+rx
> /home/user1". In my case, there is no access problem. I can ls and cd.
> Thing is, even root gets the wrong answer if it does the "is file?" query.
I performed that command, but I tore it all down and rebuilt it anyway.
Running a system call tracer (strace) shows that stat ("/var/tmp/link", )
returns -1 with errno == EACCES. `cat' displays "Permission Denied", and
`cp' says "cannot stat".
What does strace show when you run it as user1 with a script that contains
[[ -f /var/tmp/link ]]
echo $?
?
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: bug in [ -f file ] test, (continued)
- Re: bug in [ -f file ] test, Chet Ramey, 2016/07/27
- Re: bug in [ -f file ] test, László Házy, 2016/07/27
- Re: bug in [ -f file ] test, Greg Wooledge, 2016/07/27
- Re: bug in [ -f file ] test, László Házy, 2016/07/27
- Re: bug in [ -f file ] test, Siteshwar Vashisht, 2016/07/28
- Re: bug in [ -f file ] test, László Házy, 2016/07/28
- Re: bug in [ -f file ] test,
Chet Ramey <=
- Re: bug in [ -f file ] test, László Házy, 2016/07/28
- Message not available
- Re: bug in [ -f file ] test, László Házy, 2016/07/28
- Re: bug in [ -f file ] test, Piotr Grzybowski, 2016/07/28
- Re: bug in [ -f file ] test, Chet Ramey, 2016/07/28
- Re: bug in [ -f file ] test, Chet Ramey, 2016/07/28
- Re: bug in [ -f file ] test, Charles Daffern, 2016/07/28
- Re: bug in [ -f file ] test, Piotr Grzybowski, 2016/07/28
- Re: bug in [ -f file ] test, László Házy, 2016/07/28
- Re: bug in [ -f file ] test, John McKown, 2016/07/28
- Re: bug in [ -f file ] test, László Házy, 2016/07/28