Executable bit stripped from /srv/http dir

This forum is for discussion about general software issues.

Executable bit stripped from /srv/http dir

Postby keithspg » Fri Sep 28, 2018 3:54 pm

What could be causing the executable bit to be stripped from files in my web directory? I have a number of scripts which are executable. I've always run Arch for this project and naver had this problem. The last pacman -Syu was in April and everything worked as it always had with that, but after an update last week, now I get this issue and cannot seem to figure out what is doing it. I tried adding a /etc/tmpfiles.d config for this particular service which is a PHP script and that appeared to fix it, but, apparently not as it still does it every so often.

Any ideas? I am guessing it is systemd. Are there any recent developments which could cause this? The device is a RPi 3 running Arch Linux which was downloaded last week then upgraded via pacman after initial boot.

KeithSPG
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm

Re: Executable bit stripped from /srv/http dir

Postby moonman » Fri Sep 28, 2018 4:15 pm

They come like that from the package and PHP files don't need execute permission, as PHP interpreter will execute it.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Executable bit stripped from /srv/http dir

Postby keithspg » Mon Oct 01, 2018 1:34 pm

So this is PHP? I get that the *.php files do not need to be executable, but my *.sh scripts do (some PHP some bash which all start with a shebang and work properly). These scripts are the ones which keep getting changed.
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm

Re: Executable bit stripped from /srv/http dir

Postby WarheadsSE » Tue Oct 02, 2018 2:47 pm

Do me a favor, and check the files in `/usr/lib/tmpfiles.d`

$this->bbcode_second_pass_code('', '
$ tree /usr/lib/tmpfiles.d
/usr/lib/tmpfiles.d
├── arch.conf
├── cryptsetup.conf
├── dbus.conf
├── etc.conf
├── gvfsd-fuse-tmpfiles.conf
├── home.conf
├── journal-nocow.conf
├── legacy.conf
├── linux-firmware.conf
├── lxc.conf
├── man-db.conf
├── mkinitcpio.conf
├── portables.conf
├── rpcbind.conf
├── sddm.conf
├── sshd.conf
├── sudo.conf
├── systemd.conf
├── systemd-nologin.conf
├── systemd-nspawn.conf
├── tmp.conf
├── var.conf
')

`/usr/lib/tmpfiles.d` is owned by the filesystem package. Each file inside is owned by various installed packaged after it. Try `grep -Rn http /usr/lib/tmpfiles.d` to see if a package you have has started changing these permissions.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Executable bit stripped from /srv/http dir

Postby keithspg » Tue Oct 02, 2018 9:40 pm

Nothing in there seems to be owned by http... also looking at php-fpm and a couple others I see nothing that would deal with /srv/http/command or /var/www/command (where my scripts are).

root@alarm:~# tree /usr/lib/tmpfiles.d/
/usr/lib/tmpfiles.d/
├── arch.conf
├── bluealsa.conf
├── chrony.conf
├── cryptsetup.conf
├── dbus.conf
├── etc.conf
├── home.conf
├── journal-nocow.conf
├── legacy.conf
├── linux-firmware.conf
├── mkinitcpio.conf
├── mpd.conf
├── nscd.conf
├── php-fpm.conf
├── portables.conf
├── redis.conf
├── rpcbind.conf
├── sshd.conf
├── sudo.conf
├── systemd.conf
├── systemd-nologin.conf
├── systemd-nspawn.conf
├── tmp.conf
├── var.conf
└── x11.conf

0 directories, 25 files
root@alarm:~# grep -Rn http /usr/lib/tmpfiles.d\
root@alarm:~#
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm

Re: Executable bit stripped from /srv/http dir

Postby WarheadsSE » Thu Oct 04, 2018 6:33 pm

Alright, then describe to use the stack of packages you're using for PHP and web hosting, so we can attempt to narrow down where these behaviors might be coming from.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Executable bit stripped from /srv/http dir

Postby keithspg » Fri Oct 05, 2018 4:08 pm

@WarheadSE

Thanks for the help.

We are using nginx with php-fpm. The packages for PHP are libevent, phpiredis, pthreads and redis.

$this->bbcode_second_pass_code('', ' root@alarm:/etc/php/conf.d# ls
libevent.ini opcache.ini phpiredis.ini pthreads.ini redis.ini')

Do you want me to post all of the configuration files? Which ones are most interesting. These all worked before (april update) and this is a recent development after an upgrade.
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm

Re: Executable bit stripped from /srv/http dir

Postby keithspg » Mon Oct 22, 2018 7:38 pm

Could this be due to php 5.6.38? I compiled it from source.
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm


Return to General

Who is online

Users browsing this forum: No registered users and 26 guests

cron