Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
20
rated 0 times [  20] [ 0]  / answers: 1 / hits: 86484  / 2 Years ago, sun, november 6, 2022, 12:41:29

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.


More From » virtualbox

 Answers
4

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)


[#39171] Sunday, November 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
turhizz

Total Points: 82
Total Questions: 106
Total Answers: 96

Location: South Korea
Member since Mon, Dec 6, 2021
2 Years ago
turhizz questions
;