Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to create folders like /var/www/myproject/image/DYNAMIC_FOLDER using server side scripting language PHP, so I edited /etc/sudoers and added the following line:

www-data ALL=(ALL) NOPASSWD : ALL

but while considering security, it is vulnerable as the user www-data can execute any command. In order to avoid this, I would like to give only folder create and delete permissions to www-data. How can I do this?

share|improve this question
3  
Why do you need to kill asking for a password for the -whole- system for this user? You are killing a mouse by blowing up the planet... Why do you not chown/chmod the directory /var/www/myproject/image/ so www-data can read/write and not execute inside this diretory and leave the rest of your system untouched? –  Rinzwind Jun 8 '13 at 6:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.