executable permission lazarus / 1-Linux ---------------------------------------------------------------------- airpas · 2014-07-31 10:56 Hi how do you make the application run on another linux distro , without adding (chmod +x) ?. my app's run only in the distro where lazarus installed , if i move my app binary to another distro it says ( Permission denied) until i type ( chmod +x ) ---------------------------------------------------------------------- BigChimp · 2014-07-31 11:21 AFAIK you can't. Part of security. You could create a shell script that runs chmod +x yourprogram, but you still need users to run the shell script. Presumably you could write a daemon that automatically sets execute on all files in a directory or something, or there might be another mechanism to do this but I've never heard of one. ---------------------------------------------------------------------- airpas · 2014-07-31 11:45 thanks solved by put the app in a zip archive and then extract it in the guest distro . seems transferring the app (naked) from host distro to usbdisk to guest distro  , changed the permission bits!! ---------------------------------------------------------------------- BigChimp · 2014-07-31 13:45 Ah, that's a nice solution. Edit: though I wonder what happens if the user names<>uid mappings are different on those systems... ---------------------------------------------------------------------- Leledumbo · 2014-07-31 19:31 Quote from: airpas on July 31, 2014, 01:45:52 pmthanks solved by put the app in a zip archive and then extract it in the guest distro . seems transferring the app (naked) from host distro to usbdisk to guest distro  , changed the permission bits!! Yep, that's expected. Direct copying should turn off executable permission to avoid unintended run (e.g. without user noticing). ---------------------------------------------------------------------- Graeme · 2014-07-31 21:58 Quote from: Leledumbo on July 31, 2014, 09:31:13 pmYep, that's expected. Direct copying should turn off executable permission to avoid unintended run (e.g. without user noticing). I doubt it is that! The USB stick probably has a FAT32 file system, which knows nothing about Linux's file permissions. Format your USB stick as EXT3/4, JFS etc.... any file system that supports *nix like permissions, then copying files onto it will retain permissions. USB sticks might come standard with FAT32, but they can be formatted (just like a hard drive) to any other file system. All my USB sticks don't have FAT32 any more. Alternatively, tar.gz the files before copying. ---------------------------------------------------------------------- Leledumbo · 2014-07-31 22:34 Quote from: Graeme Geldenhuys on July 31, 2014, 11:58:30 pmQuote from: Leledumbo on July 31, 2014, 09:31:13 pmYep, that's expected. Direct copying should turn off executable permission to avoid unintended run (e.g. without user noticing). I doubt it is that! The USB stick probably has a FAT32 file system, which knows nothing about Linux's file permissions. Format your USB stick as EXT3/4, JFS etc.... any file system that supports *nix like permissions, then copying files onto it will retain permissions. USB sticks might come standard with FAT32, but they can be formatted (just like a hard drive) to any other file system. All my USB sticks don't have FAT32 any more. Alternatively, tar.gz the files before copying. Proven on my machine. I transfer between two ext4 drives. ---------------------------------------------------------------------- marcov · 2014-08-01 09:50 Alternatively, some commonly used NASses have NFS options. This allows for native *nix shares. ---------------------------------------------------------------------- Graeme · 2014-08-01 12:44 QuoteProven on my machine. I transfer between two ext4 drives. That is very strange because I have used a ext3 formatted usb stick for a couple years now, and have so problems copying files to and from, and still keeping file permissions intact. What program do you use to do the copying? ---------------------------------------------------------------------- Leledumbo · 2014-08-02 08:32 Quote from: Graeme Geldenhuys on August 01, 2014, 02:44:39 pm QuoteProven on my machine. I transfer between two ext4 drives. That is very strange because I have used a ext3 formatted usb stick for a couple years now, and have so problems copying files to and from, and still keeping file permissions intact. What program do you use to do the copying? Err... cp ---------------------------------------------------------------------- marcov · 2014-08-02 10:36 Quote from: Graeme Geldenhuys on August 01, 2014, 02:44:39 pm QuoteProven on my machine. I transfer between two ext4 drives. That is very strange because I have used a ext3 formatted usb stick for a couple years now, and have so problems copying files to and from, and still keeping file permissions intact. What program do you use to do the copying? Permissions or ownership? Permissions should be ok with any suitable *nix capable filesystem. (though suid and other increased privileges might be skipped). Ownership is a matter of keeping uid's and gid's in sync. ---------------------------------------------------------------------- Graeme · 2014-08-02 23:54 Quote from: marcov on August 02, 2014, 12:36:50 pmPermissions or ownership? As I said, permissions wasn't a problem. I was referring to the standard RWX for World, Group and Owner. QuoteOwnership is a matter of keeping uid's and gid's in sync. Yes, I had to tweak my uid's between the two systems.