All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
Cannot test for execute bit on files in NFS shares
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
Cannot test for execute bit on files in NFS shares - May 9, '06, 3:51:25 PM
|
|
|
Ron
Posts: 77
Joined: May 21, '03,
Status: offline
|
Hi all, another strange one...
Using SUA (R2), nfsmount or navigate to a /net/nfserver/share directory and test a file for the execute bit. In all cases the test will return 'true' regardless if it the execute bit is set or not.
$ touch testfile
$ ls -alF testfile
-rw-rw-r-- 1 SOMESRV+Administrator SOMESRV+sys 0 May 9 15:44 testfile
$ test -x testfile; echo $?
0 <--- wrong, should be 1
$ chmod +x testfile
$ ls -alF testfile
-rwxrwxr-x 1 SOMESRV+Administrator SOMESRV+sys 0 May 9 15:44 testfile*
$ test -x testfile; echo $?
0
I've also tried the ksh test method'[[ -x testfile ]]' with the same results.
Has anyone been able to get this work?
Regards,
Ron
|
|
|
RE: Cannot test for execute bit on files in NFS shares - May 9, '06, 4:19:08 PM
|
|
|
Ron
Posts: 77
Joined: May 21, '03,
Status: offline
|
Seems this is only a problem when running ksh.
Csh and Perl look ok.
|
|
|
RE: Cannot test for execute bit on files in NFS shares - May 9, '06, 5:00:45 PM
|
|
|
Rodney
Posts: 3696
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
|
Yeah, ksh uses a build-in version of test while csh uses /bin/test.
I'm not running any NFS today, so I can't test it myself against 5.2.14 (ksh the next generation).
I've placed the 5.2.14 binary on the ftp site in /pub (no package) if you want to try it.
A workaround is to have all scripts explicitly refer to /bin/test.
|
|
|
RE: Cannot test for execute bit on files in NFS shares - May 9, '06, 5:09:57 PM
|
|
|
Ron
Posts: 77
Joined: May 21, '03,
Status: offline
|
Thanks for the tip to try /bin/test; I'll do just that.
Tried ksh 5.2.14, sadly it exhibits the same issue (at least when run under SUA R2).
Ron
|
|
|
RE: Cannot test for execute bit on files in NFS shares - May 9, '06, 5:41:29 PM
|
|
|
Rodney
Posts: 3696
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
|
mmm, darn about 5.2.14.
I'm testing an rcp update/fix right now.
I'll look through later to see if I can find it in ksh.
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|