Wierd permissions issue on Irix??

Armitage

Banned
Feb 23, 2001
8,086
0
0
I'm running make in my code directory, and end up with an executable with the correct permissions. But when I copy this file up one level in the directory structure, the execute permissions get stripped off?!? I can add them back manually with chmod, but WTF?
Any ideas?
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Yea, but shouldn't it automatically carry the permissions if I own the source & destination locations, etc.? I've never run into this issue before.

And what's wierder is that now it appears to act properly, but the guys adminning the system say they didn't do anything. But occasionally after a build, the executable doesn't have execute permission.

ghost in the machine :confused::Q
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
As an example (I don't have enough experience with Irix so feel free to correct me on specifics even if I get the general idea down) is:

You make a program himom.c in /home/ergeorge/code
You compile and can run ./himom without issue.
You then cp ./himom ../ to your home directory, but if you try to run ~/himom you don't have permission (no X bit set)?

Correct? But now things are working fine? I don't get it :p
 

Ynog

Golden Member
Oct 9, 2002
1,782
1
0
From my experiences on IRIX, and linux for that matter, just cp doesn't copy all permissions.
It copies the permissions of the file minus the umask. Now does this happen when you
copy just up one directory or does it happen when you copy a file anywhere?

Check your umask, sometimes admins can set the umask in a system environment file..
You might need to set it in your environment files.

After that i would check to make sure nothing was added to your Makefile, that modified
permissions. Not sure if you are working on a project alone, but sometimes people add
stupid stuff in Makefiles.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: n0cmonkey
As an example (I don't have enough experience with Irix so feel free to correct me on specifics even if I get the general idea down) is:

You make a program himom.c in /home/ergeorge/code
You compile and can run ./himom without issue.
You then cp ./himom ../ to your home directory, but if you try to run ~/himom you don't have permission (no X bit set)?

Exactly

Correct? But now things are working fine? I don't get it :p

The problem appears to be intermittant. Occasionally the binary that comes out of the build process doesn't have the X bit set?!?!? Like I said ... ghost in the machine.

FWIW, my relationship with Irix is very much a love/hate sort of thing. I'll be happy enough when they move everything over to Linux.

 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: Ynog
From my experiences on IRIX, and linux for that matter, just cp doesn't copy all permissions.
It copies the permissions of the file minus the umask. Now does this happen when you
copy just up one directory or does it happen when you copy a file anywhere?

It appears to be very intermittant, and I've copied it a few other places and experience the problem as well.

Check your umask, sometimes admins can set the umask in a system environment file..
You might need to set it in your environment files.

umask appears to be OK.

After that i would check to make sure nothing was added to your Makefile, that modified
permissions. Not sure if you are working on a project alone, but sometimes people add
stupid stuff in Makefiles.

I wrote the makefile ... didn't put anything wierd in it.

 

drag

Elite Member
Jul 4, 2002
8,708
0
0
could be that IRIX uses ACLs and maybe something with the cp command doesn't support them fully...

or

The problem I suppose would be with the linker... you know you compile the code then the linker makes it exacutable, when using stuff like gcc that's all done automaticly. Maybe it's a bug with the compile/linker/enviroment your using.

If you copy the file can you just make it executable again? Does it change any other permissions or stuff?

That's about all the use I'd be. Have absolutely no experiance with IRIX...