Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

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
  Printable Version
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> Cannot test for execute bit on files in NFS shares Page: [1]
Login
Message << Older Topic   Newer Topic >>
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
Post #: 1
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.

(in reply to Ron)
Post #: 2
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.

(in reply to Ron)
Post #: 3
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

(in reply to Rodney)
Post #: 4
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.

(in reply to Ron)
Post #: 5
Page:   [1]
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> Cannot test for execute bit on files in NFS shares Page: [1]
Jump to:





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


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.031