0

I'm running $ scp user@domain.tld:/path/to/file .

The file's not in the server's home directory. I ran sudo chmod a+r on the server's file and sudo chmod a+w on my local directory, but nothing changed.

Daniel
  • 1
  • 1
  • You need to check the permissions for the file and its containing directories. – Michael Hampton Oct 29 '20 at 16:54
  • It was just a text file, but I changed permissions, nothing worked, and then someone on another forum suggested `$ ssh user@domain.tld -- sudo -S cat "file" > newname.txt` which worked. – Daniel Oct 29 '20 at 17:29
  • OK, so you do have a permissions problem. – Michael Hampton Oct 29 '20 at 17:32
  • Yes, but I'd rather not mess with permissions of files that aren't in my home folder, for security reasons, especially on a server and when I didn't keep track of the original permission schemes. – Daniel Oct 29 '20 at 17:33
  • Haha, but using `sudo` to bypass all your security? – Michael Hampton Oct 29 '20 at 17:34
  • Yes, for that moment, instead of not remembering the previous permissions schemes and risking not reverting them properly. – Daniel Oct 29 '20 at 17:35
  • But to be fair, I wouldn't mind knowing what permissions I would've needed to give, exactly, e.g. `$ sudo chmod a+r` or what. – Daniel Oct 29 '20 at 17:42
  • Well, you need to go back to my very first comment. – Michael Hampton Oct 29 '20 at 17:44
  • I thought that in that comment you were implying that I needed to check them so I'd know what changes to make, but I don't know what changes I would've needed to make, assuming that the changes I tried were the right ones, which it seems they weren't. – Daniel Oct 30 '20 at 15:44
  • You could post what you find, so that others can take a look and give advice. – Michael Hampton Oct 30 '20 at 18:27

0 Answers0