# scp permissions question [solved]

## h2sammo

i secured copied some files from one machine to another and now my user on the recipient machine can only open those files "read only". is there a permission paramter i can pass to my scp command to allow me to use the files fully on the recipient machine?

thank youLast edited by h2sammo on Mon May 10, 2010 6:08 pm; edited 1 time in total

----------

## ShinyDoofy

You might want to try to copy those files with "scp -p" to keep original permissions.

Other than that, do the files belong to the user they're supposed to belong to? I.e. is the owner the same user that you try to open your files with? If not, chmod can fix that for you.

----------

## h2sammo

its a different user. thank you.

for others wondering, 

```
scp -pr /home/user/dir/* user@190.0.etc:/home/user/dir
```

 would copy all filed from /dir recursively (including folders) AND keep original permissions.

if (like in my case) you want to copy the files to a different user, 

```
ls -l /home/user/dir/
```

 would show the file permissions (r: read, w: write, etc).

to solve my probelm i had to 

```
chmod a+w /home/user/dir/
```

 that gives writing permissions to all users to files in /home/user/dir.

----------

