how can copy with pscp and modify the permissions?

Advertisement

Fer
Guest

how can copy with pscp and modify the permissions?

Hi!!

im writting a perl program (in windows) that use the pscp for upload my files generates in it.

it works perfectly , but when i would see the pages, i can't because the files don't have the permissions

how can i upload the files generated to the server with the corrects permissions.

thanks a lot!!!

(sorry by my english) :roll:

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,097
Location:
Prague, Czechia

Re: how can copy with pscp and modify the permissions?

It is not possible. If PSCP is running in SCP mode, it sends 0644 permissions. These permissions are used only, if -p parameters is used. Otherwise default permissions (as defined by server) are used. If PSCP is running in SFTP mode, default permissions are used always.

Have you tried writing script for PSFTP, if SFTP is an option? PSFTP have command chmod.
_________________
Martin Prikryl

Reply with quote

Twilight
Guest

Re: how can copy with pscp and modify the permissions?

martin wrote:

...These permissions are used only, if -p parameters is used. Otherwise default permissions (as defined by server) are used. ...

I was just wondering which server - source or destination?

Many thanks in advance,
DT

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,097
Location:
Prague, Czechia

Re: how can copy with pscp and modify the permissions?

Twilight wrote:

I was just wondering which server - source or destination?
When uploading, the source is a client and the destination is a server.

Reply with quote

Advertisement

You can post new topics in this forum