0

When I run bash ./rebuild.sh I get the following error:

vagrant@user:/var/www/html/wp-content/xdebug$ bash ./rebuild.sh
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
shtool at '/var/www/html/wp-content/xdebug/build/shtool' does not exist or is not executable.
Make sure that the file exists and is executable and then rerun this script.

According to this answer I should "Remove noexec flag from /var/www/html/". When I try this, I get another error:

$ sudo mount -o remount,noexec /var/www/html/
unknown mount option `relatime'
valid options:
  rw         mount read write (default)
  ro         mount read only
  uid       =<arg> default file owner user id
  gid       =<arg> default file owner group id
  ttl       =<arg> time to live for dentry
  iocharset =<arg> i/o charset (default utf8)
  convertcp =<arg> convert share name from given charset to utf8
  dmode     =<arg> mode of all directories
  fmode     =<arg> mode of all regular files
  umask     =<arg> umask of directories and regular files
  dmask     =<arg> umask of directories
  fmask     =<arg> umask of regular files

I'm pretty stuck here as I have not found much out there on this issue. How do I 'fix' this?

From the xdebug README file ./rebuild.sh : "This will run phpize, ./configure, make clean, make and make install."

When I run phpize alone I also get the same error. What is causing this?

  • 2
    what does grep /var/www /etc/fstab show ? – Jasen May 13 '18 at 6:24
  • @Jasen it doesn't list anything – orangeMint May 13 '18 at 16:56
  • Is your issue that you are having trouble running bash ./rebuild.sh or that you are having trouble with your /var/www/html mount? The command sudo mount -o remount,noexec /var/www/html/ would set noexec on that location which would prevent execution and would only work if that were a mount point (which your statement that /var/www is not in /etc/fstab in the previous comment tells me it is not a mount point). If you just need bash ./rebuild.sh to work, have you checked the permissions of /var/www/html/wp-content/xdebug/build/shtool to see if it allows execution? – GracefulRestart May 13 '18 at 22:48
  • @GracefulRestart the issue is coming from sudo mount -o remount,noexec /var/www/html/. The bash ./rebuild.sh was just to give context. I've set that file to be executable before, but just ran ls -l {file} and I get -rw-r--r-- 1 vagrant vagrant 142086 ... and from what I know it doesn't have execute permissions. When I run ` sudo chmod +x {file}` I don't get any errors though. – orangeMint May 13 '18 at 23:47
  • is /var/www/html actually a mountpoint? if not then doing sudo mount -o remount,noexec /var/www/html/ won't do anything. From what I can tell, your issue seems to be shtool at '/var/www/html/wp-content/xdebug/build/shtool' does not exist or is not executable and you just showed in your last comment that specific file is not executable. If you still think the mount command is your issue, please provide the output of mount | grep /var – GracefulRestart May 14 '18 at 2:37
1

You mention in your comment that the files come from Windows, which is an odd statement to make if there are no mount points in your vagrant VM. If you are using the synced folder functionality of vagrant, that would be helpful information to know, i.e. mountpoints and any mount options you are using.

The command chmod +x /var/www/html/wp-content/xdebug/build/shtool would add the executable bit for owner, group and everyone to that one file if it exists on a linux filesystem. If, immediately after running that, the execute bit was not set, then the remaining option is that those files are indeed being shared/synced from Windows.

The vagrant synced folders are configured in your vagrantfile, you must set permissions and mount options there as they will not be able to be set by standard linux tools. Look for vm.synced_folder settings, and configure as desired.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.