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.
You're doing it wrong (tm) :)
In your terminal window, look at the "command prompt":
What is
username
there? You can also try enteringwhoami
[Enter] to see your current username.From you description it looks like you entered something like
or somehow else opened a console session as www-data user. This user has no rights to use
sudo
command, so your attempts at usingsudo
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: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)To change password use this command sudo passwd username ,change username with user you want to set new password,but also you should check ownership and group of particular directory. Use this command ls -l /path/to/file #the third field in the ls -l output is the user and the fourth is the group
You can change group and ownership with chown