Web lists-archives.com

Re: when I try to open file with another user on CYGWIN , I get access denied message




On 5/17/2017 9:45 AM, Alex wrote:
> On 16/05/2017 20:22, Dan Kegel wrote:
>> On Tue, May 16, 2017 at 7:44 AM, Alex <lombak@xxxxxxx> wrote:
>>>> Did you try
>>>>      chmod 755 foo.dat
>>>> on the file (assuming it's named foo.dat)?
>>>
>>> Yes I did , but I can access only the current files. If they send new file
>>> next time, it won't get this setup so not possible to open.
>>
>> Just add the chmod in your script.
>>
> Hi Dan
> Could you please tell me how can I chmod to script , I don't know how to do it
> Thanks

sftp has a chmod command that change the access modes of the remote file.
Add a chmod after the command that copies the file over.  chmod and the
meaning of the modes are standard Unix things, and "man chmod" for the
command line chmod (not the OS call) will explain it somewhat (the
syntax in sftp is probably more limited).

HTH -- Eliot Moss

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple