If you use drush fserver-package to update packages from a git repository, it seems to work but spits out the following errors:
WD php: sprintf(): Too few arguments in /usr/local/src/drush/includes/drush.inc on line 1269. [error]
WD php: sprintf(): Too few arguments in /usr/local/src/drush/includes/drush.inc on line 1269. [error]
WD php: chmod(): Operation not permitted in /usr/local/src/drush/includes/drush.inc on line 1164. [error]
WD php: chgrp(): Operation not permitted in /usr/local/src/drush/includes/drush.inc on line 1164. [error]
(updated project info here)
sprintf(): Too few arguments in /usr/local/src/drush/includes/drush.inc on line 1269. [warning]
sprintf(): Too few arguments in /usr/local/src/drush/includes/drush.inc on line 1269. [warning]
chmod(): Operation not permitted in /usr/local/src/drush/includes/drush.inc on line 1164. [warning]
chgrp(): Operation not permitted in /usr/local/src/drush/includes/drush.inc on line 1164. [warning]
Additionally, it complains if the URI isn't specified - but is the URI really necessary if the command is run from within a site directory?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 0001-Fixing-error-notices.patch | 948 bytes | danepowell |
Comments
Comment #1
danepowell commentedActually upon further inspection, the command does NOT produce a good tarball- strangely, the tarball appears to be empty if exploded in a Windows environment (using 7zip). It unpacks just fine in Ubuntu.
Comment #2
danepowell commentedWoah... if I just copy the file to my home directory and then via FTP to my Windows machine, it opens just fine. But if I download it via the web to my Windows machine and open it, the directory is empty. How weird is that? I suspect this problem must be related to these errors.
Comment #3
danepowell commentedSorry for the confusion- it turns out that the tarball bug was due to caching serving up a stale version of the file. The tarball seems to be just fine, so you can ignore #1 and #2. But the original drush errors still persist.
Comment #4
eugenmayer commentedConfirm those errors on my installation on fserver-package. Most of the work which could be affecting this is the new git-tag detection. I will need to debug this to see the stacktrace.
Comment #5
danepowell commentedWell half of the errors are easy to fix (see attached patch)
The other errors are due to drush trying to chmod the files/fserver folder. If drush actually created that folder (i.e. if the very first fserver release on your site was from a git or svn repo), then drush also has permissions to chmod it, so no problem. However, if the webserver created the folder (if your first release was a manual package upload), then drush will NOT have permission to edit the folder.
I'm not really sure what the solution is. For me, I was able to "chown aegir:www-data files/fserver", but obviously this won't work for everybody, as the drush user doesn't have to be 'aegir'.
Comment #6
danepowell commentedComment #7
eugenmayer commentedGood work Dane!
For the chmod isseu: I think we just should detect that this is not possible and give a meaningful error message in the console, thats it. What do you think?
Comment #8
danepowell commentedI think line 392 (
drush_op('chmod', $file_path, 0775);) is actually unnecessary- on a fresh install of Drupal, commenting out that line and running drush fserver-package, the fserver folder is already created with 0775 permissions. So unless there's something unique about my setup, I think that line should just be removed.There's a comment at the top of fserver.drush.inc that I think is relevant...
... but wrong :) Like I said, it appears that files are created by default with 775, not 600... so either this 'crazy bug' has been fixed, or there's something unique about my setup.
Comment #9
eugenmayer commentedWell we should be aware about this. This could be e.g. related to your umask for the aegir / host / script user or your default system-umask. We should verify that this bug has been fixed in D6, AFAIR it has not been
Comment #10
danepowell commentedAh yes, I just double-checked and the umask in use is 002- so in general, the permissions may not be as lenient for all users, and they might need to be set manually. Sorry about any confusion.
Comment #11
eugenmayer commentedOk, so our consensus would be, checking if we can change the permissions and if not, we notify the user with something like
"Failed changing permissions of folder XYZ to 755 due to wrong ownership. Please fix this using a privileged user yourself by running `chmod XYZ 755`"
What do you think?
Comment #12
danepowell commentedSounds good
Comment #13
bforchhammer commentedNote that the command
drush fserver-distroalso throws thechgrp()error a bunch of times...Comment #14
cyberwolf commentedSubscribing.