Chris Muench
Chris Muench

Reputation: 18338

scp /var/log/httpd on amazon linux

I am trying to do:

scp ec2-user@php-pos-web-1:/var/log/httpd/* tmp/php-pos-web-1;

I get permission denied because those files are owned by root. I don't want to enable root login. Is it ok if I change the group for that folder? What is the best way?

I am on amazon linux

Upvotes: 0

Views: 56

Answers (1)

Jakuje
Jakuje

Reputation: 25976

It is generally not a good idea to change the permissions to system folders. They are not world-readable for a reason. They can expose potentially sensitive data (accessed pages, clients IP addresses, ...).

You should on the other way copy the files to some some accessible location (/tmp) using sudo and then copy them over the network back.

Upvotes: 1

Related Questions