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 am running Ubuntu on a Oracle Vbox in Windows 7 to develop a website. I have a set of directories that have owner read/write permissions but the group www-data does not have rights on the directories.

I tried the command sudo chmod 640 /path-to-directory to change the status, but receive a message requesting my www-data password. My owner level password does not work and I do not know what this password might be.

I tried passwd and receive the message 'changing the password for www-data and a prompt for my current password. When I enter it, I get this error message:

passwd: Authentication token manipulation error
passwd: password unchanged

This error message looks more like some sort of problem on my system, but everything else works fine.

share|improve this question

1 Answer 1

up vote 10 down vote accepted

You're doing it wrong (tm) :)

In your terminal window, look at the "command prompt":

username@hostname:~$

What is username there? You can also try entering whoami[Enter] to see your current username.

From you description it looks like you entered something like

sudo su www-data

or somehow else opened a console session as www-data user. This user has no rights to use sudo command, so your attempts at using sudo fail.

www-data user also has no password set by default, so it is impossible to log in directly as this user. Which is good. You do not want to give it a password.

You need to open another session as your user (or exit your current www-data session) and type the commands there:

sudo chown yourusername:www-data /path/to/directory

which will ask you for your login password.

(or, maybe, just move your stuff to /var/www which already has correct permissions. Then you can add your user to www-data group to get read-write privileges to that directory)

share|improve this answer
    
Thanks, but I am a bit confused. "whoamI" tells me I am www-data, even in the system directories. So I attempted to switch users and the only name listed is my unix (owner) name, but that is linked to this www-data session. This setup was generated automatically to run a Drupal website and I do not understand the subtleties of Ubuntu. How do I go about logging in with my owner identity? BTW I tried moving the directories to /var/www, but I do not have the authority to do so as www-data. –  Ashlar Apr 21 '12 at 22:06
    
Open another terminal window. Type whoami there. Are you still www-data there? I'm not sure what you mean by "unix (owner) name" - what username do you enter when logging in? Is something like "ashlar" or "admin" or is it "www-data"? –  Sergey Apr 21 '12 at 22:39
    
I opened a separate question on this here askubuntu.com/questions/124073 and will add responses there. –  Ashlar Apr 21 '12 at 22:44
    
My bad. I misunderstood your instructions. I was able to start another terminal session as the owner and make the changes! –  Ashlar Apr 21 '12 at 22:57

Your Answer

 
discard

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

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