Bug #29326

./flow3 core:setfilepermissions should not rely on sudo without proper test

Added by Steffen Müller about 10 years ago. Updated over 8 years ago.

Should have
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Has patch:


./flow3 core:setfilepermissions calls sudo without a proper test if it is installed and correctly setup.
On systems without sudo this leads to gazillions of ugly failing sudo calls within the find loop.

This can be reproduced on standard debian installation which is shipped without sudo.

I suggest not to rely on sudo at all, but prompt the user for running ./flow3 core:setfilepermissions as root or with sudo himself.


Updated by Karsten Dambekalns about 10 years ago

  • Category set to Command
  • Target version set to 1.0 beta 2

Wow, a vanilla Ubuntu setup doesn't have sudo? I'm surprised, never seen a system without it... :)


Updated by Christian Müller about 10 years ago

No idea about current Debian but I am pretty sure Ubuntu still has sudo, they usually rely on it as they don't allow su by default.


Updated by Steffen Müller about 10 years ago

Ubuntu ships sudo when using default installer. Debian (aka ubuntu vanilla) does not. Those .deb based systems which have been setup with dbootstrap do not neccessarily have sudo. And Ubuntu users could have uninstalled sudo.

However, the main point is: shell scripts should always test for third party tools (maybe with one exception for gnutools).

But in case of sudo, I would never use sudo wraps in shell scripts:

"The thing is that the best decision is always the one that gives control to the user, so that he decides to run your script as root or not by making him write "sudo" or not..."

So please just remove sudo calls from the script. Instead, add a check if the user has root permissions and exit with a notice if not.


Updated by Mr. Hudson about 10 years ago

  • Status changed from New to Under Review

Patch set 1 of change Ied6dae7d4a78909442ac5087767267214f6ebc12 has been pushed to the review server.
It is available at http://review.typo3.org/4871


Updated by Steffen Müller about 10 years ago

Thanks for taking care.
Could be please also remove sudo call from the script?


Updated by Robert Lemke about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Updated by Steffen Müller about 10 years ago

Problem is still not fixed.


Updated by Christian Nölle almost 9 years ago

Well, just tried to kickstart a new FLOW installation based on 1.1.0, problem still occurs. Furthermore there is no documentation on how to set up permissions by hand.


Updated by Ottmar Biebersdorf over 8 years ago

Can confirm this issue on Debian Squeeze using the current master (15.02.2013). Running the script as root produces lots of errors "sudo not found". After installing sudo the script is running fine without errormessage.

Also available in: Atom PDF