cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
weelyn
Level 5

Unix files permissions

I've searched the forums and found nothing, sorry if I missed it.
My problem is that I execute a command which InstallAnywhere just installed, but the file permissions are wrong.
Just before I try to run the command, I've added a "ls -la" to see the rights, here's what I get:

Exit status from /bin/ls: 0, stdout/stderr:

drwxrwxr-x 3 root root 4096 Jun 10 09:07 .
drwxrwxr-x 9 root root 4096 Jun 10 09:07 ..
-rw-rw-r-- 1 root root 71634 Jun 8 08:51 .exe.xxxstream_admin
-rw-rw-r-- 1 root root 33258 Jun 8 08:51 .exe.xxxstream_ftpd
-rw-rw-r-- 1 root root 397035 Jun 8 08:51 .exe.xxxstream_server
-rw-rw-r-- 1 root root 573 Jun 8 16:40 xxxstream_admin
-rw-rw-r-- 1 root root 573 Jun 8 16:40 xxxstream_ftpd
-rw-rw-r-- 1 root root 573 Jun 8 16:40 xxxstream_server

Of course, when I try to execute one of those commands, I get "Permission Denied":

Command.run(): Cannot run program "/root/xxx/xxxStream/bin/xxxstream_server": java.io.IOException: error=13, Permission denied
Installer: pass 0: deferred: com.zerog.ia.installer.actions.Exec -- Execute Command: /root/xxx/xxxStream/bin/xxxstream_server --create

But when the install is complete, the permissions are right:

drwxrwxr-x 3 root root 4096 Jun 10 09:07 .
drwxrwxr-x 9 root root 4096 Jun 10 09:07 ..
-rwxrwxr-x 1 root root 71634 Jun 8 08:51 .exe.xxxstream_admin
-rwxrwxr-x 1 root root 33258 Jun 8 08:51 .exe.xxxstream_ftpd
-rwxrwxr-x 1 root root 397035 Jun 8 08:51 .exe.xxxstream_server
-rwxrwxr-x 1 root root 573 Jun 8 16:40 xxxstream_admin
-rwxrwxr-x 1 root root 573 Jun 8 16:40 xxxstream_ftpd
-rwxrwxr-x 1 root root 573 Jun 8 16:40 xxxstream_server

Obviously, it seems InstallAnywhere fixes the permissions ATFER executing the actions in the "Files" stage. Whereas I carefully prepared the files so InstallAnywhere could just copy them as they are, with the original permissions.

I tried to disable the "default permissions" in the "Project => Platforms => UNIX" panel, but it doesn't work as I want it to. All files end up with "rw-rw-r--".

Any idea? I'm just going to make a piece of Java code to fix the permissions myself, but it's really annoying -- I will have to keep track of ALL the permissions myself.
Labels (1)
0 Kudos
(3) Replies
pv7721
Level 20

If this is the case (and I think it is) of IA touching permissions after all files are installed (which might make sense) wouldn't it be possible for you to move your action in the post-install?
0 Kudos
sushant
Level 3

see

No need to make the java code !!!!

- if u want urfiles to be installed with permissions having each file different permissions, then use manifest file. it has format of installing the file with diffeernt permissions....
0 Kudos
weelyn
Level 5

pv7721 wrote:
...wouldn't it be possible for you to move your action in the post-install?


Good idea. I just took a look, and the problem is that I have actions:
- which should occur after the code execution action
- which must be uninstalled, so if I move them into the uninstall stage, they won't get uninstalled anymore

Now, I could re-order the actions. I'll look deeper into it. The interesting point is that I don't need those executables to be run at uninstall time, so it looks like a clean solution.

I'll also look at the manifest thing that sushant mentionned, I shouldn't have trouble building a manifest, and if it allows me to put exactly the permissions I want on the files, that would be great. Right now, all files are in rwxr-xr-x, which is not a big problem, but it's a bit unclean.

Thanks a lot for your answers guys! You're great 🙂
0 Kudos