Posted: 2015-12-31 06:48
I am synchronize my windows folder to linux folder.
I change transfer options file permission but it remains default (rw------)
My Code is as below:
SessionOptions sessionOptions = new SessionOptions
Protocol = Protocol.Ftp,
HostName = xxxxx,
UserName = xxxxx,
Password = xxxxx,
using (Session session = new Session())
session.FileTransferred += FileTransferred;
TransferOptions option = new TransferOptions();
FilePermissions filePermission = new FilePermissions();
filePermission.GroupExecute = true;
filePermission.GroupRead = true;
filePermission.GroupWrite = true;
filePermission.OtherExecute = true;
filePermission.OtherRead = true;
filePermission.OtherWrite = true;
filePermission.UserExecute = true;
filePermission.UserRead = true;
filePermission.UserWrite = true;
option.FilePermissions = filePermission;
SynchronizationMode.Remote, local folder path, remote folder path, false, false, SynchronizationCriteria.Size, option);
Location: Prague, Czechia
Do you expect the code to change permissions of the existing remote files? (it won't)
Or is the problem even with newly uploaded (synchronized) files?
Posted: 2016-01-04 12:28
Thanks for your reply..
My issue was solved actually I am using EC2 instance and I access one folder by FTP user and also by web(www-data) so there is some issue regarding permission when new file is created by FTP user.
It is solved by changing permission of FTP user on server side.
Thanks for your time..
You can post new topics in this forum
And it's free!