0

I am noob and I have two VPS servers. In the first server, I have user "bob". And I copied-pasted folder (home/bob) this user in the same folder in second VPS server. And when I tried to change a file in this folder (in the second server) a console speaks "permission denied ". What is the problem?

  • You should first change the owner of that copied folder in VPS B then you should be able to access those files – George Udosen Oct 30 '17 at 18:51
  • Hello and welcome to Ask Ubuntu! You appear to be a new user, so please take a look at our tour for advice on how to best use Ask Ubuntu to get help! Also, please take a look at our How to Ask guide for some advice on writing awesome questions. – Kaz Wolfe Oct 30 '17 at 19:00
0

Copying files tends to copy permissions, which includes the UID. You will need to reset the UID:

sudo chown -R youruser:youruser /path/to/folder

So, if you want to make /home/bob owned by bob on your second VPS, run:

sudo chown -R bob:bob /home/bob

I would recommend you read these two excellent pages from the Arch Wiki:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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