Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] (PTP synchronized projects) Problems using multiple ssh accounts grouped together for teamwork

What happens if you change the permission to -rw-rw---- locally?

On Sep 27, 2019, at 11:09 AM, 김태식 <taisikt@xxxxxxxxx> wrote:

The umask for remote Linux A users is 007 and the exclude file is ‘-rw-------'.
Even if I forcibly change to '-rw-rw ----' remotely, it will be changed to '-rw -------' again after project synchronization.

2019. 9. 27. 오후 11:20, Greg Watson <g.watson@xxxxxxxxxxxx> 작성:

What is your umask set to on the Linux machine? I just tried on my Mac (umask is 0022) and the exclude file has permissions '-rw-r—r—‘ .

Greg

On Sep 27, 2019, at 2:45 AM, 김태식 <taisikt@xxxxxxxxx> wrote:

Thank you for your reply.
But I have no idea how to act.  

My environment is local-windows / remote-centos.  
Where can I change the IFileStore.copy option??? Where can I set jsch / porxy local / remote??? 
Is this part of the Eclipse preferences screen configurable?  

Can you tell me more specific solutions?

나의 iPhone에서 보냄

2019. 9. 27. 오전 9:00, Greg Watson <g.watson@xxxxxxxxxxxx> 작성:

The IFileStore#copy() method (part of Eclipse) calls IFileStore#putInfo() with options set to EFS.SET_ATTRIBUTES | EFS.SET_LAST_MODIFIED, I guess to copy the file attributes as well as the contents of the file. According to the documentation for putInfo():

Since Eclipse 3.6, implementations shall also make a best effort
to consult UNIX umask in order to set the same attributes for other access groups. 

However, since this is happening over an ssh channel, the Jsch implementation is not checking the umask on the remote system, it is just sending a chmod command with the same permissions that are set on the original file. I think this is why you’re seeing this behavior.

I’m not 100% sure, but I think that if you used the PROXY remote connection type rather than JSCH, you would probably see the correct behavior, since the PROXY uses the Eclipse putInfo() on the remote end.

Regards,
Greg


On Sep 26, 2019, at 3:32 PM, John Eblen <jeblen@xxxxxxx> wrote:

That is a very good question. The command that copies the file (at GitRepo.java line 205) only passes the EFS.OVERWRITE
option to IFileStore.copy(), which I wouldn't expect to change the permissions. Also, I noticed that
this file copy occurs separately from any git operations, so my suggestion about using hooks probably
wouldn't work.

John




On Thu, Sep 26, 2019 at 6:45 AM 태식김 <taisikt@xxxxxxxxx> wrote:
Thank you very much for the answer.

Attach the error log that occurs when testing with the procedure below.

1. Synchronize projects as user A
2. 'mv .ptp-sync .ptp-sync.bak' on the remote system as user A
3. 'cp -r .ptp-sync.bak .ptp-sync' on remote system as user B
4. 'chmod g + rw -R .ptp-sync' on remote system as user B
5. Attempt to synchronize project as user A

What is the intention of 'chmod' in the error log?

—————

!ENTRY org.eclipse.ptp.rdt.sync.ui 4 4 2019-09-26 08:50:17.020
!MESSAGE Error
!STACK 1
org.eclipse.ptp.rdt.sync.core.exceptions.RemoteSyncException: org.eclipse.remote.core.exception.RemoteConnectionException: Permission denied
           at org.eclipse.ptp.internal.rdt.sync.git.core.GitRepo.uploadFilter(GitRepo.java:239)
           at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.doSync(GitSyncService.java:635)
           at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.synchronize(GitSyncService.java:544)
           at org.eclipse.ptp.rdt.sync.core.SyncManager$SynchronizeJob.run(SyncManager.java:80)
           at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.remote.core.exception.RemoteConnectionException: Permission denied
           at org.eclipse.remote.internal.jsch.core.commands.PutInfoCommand.chmod(PutInfoCommand.java:68)
           at org.eclipse.remote.internal.jsch.core.commands.PutInfoCommand.getResult(PutInfoCommand.java:43)
           at org.eclipse.remote.internal.jsch.core.JschFileStore.putInfo(JschFileStore.java:322)
           at org.eclipse.core.filesystem.provider.FileStore.transferAttributes(FileStore.java:466)
           at org.eclipse.core.filesystem.provider.FileStore.copyFile(FileStore.java:203)
           at org.eclipse.core.filesystem.provider.FileStore.copy(FileStore.java:131)
           at org.eclipse.core.internal.filesystem.local.LocalFile.copy(LocalFile.java:127)
           at org.eclipse.ptp.internal.rdt.sync.git.core.GitRepo.uploadFilter(GitRepo.java:205)
           ... 4 more
!SUBENTRY 1 org.eclipse.ptp.rdt.sync.git.core 4 0 2019-09-26 08:50:17.020
!MESSAGE org.eclipse.remote.core.exception.RemoteConnectionException: Permission denied
!STACK 1
org.eclipse.remote.core.exception.RemoteConnectionException: Permission denied
           at org.eclipse.remote.internal.jsch.core.commands.PutInfoCommand.chmod(PutInfoCommand.java:68)
           at org.eclipse.remote.internal.jsch.core.commands.PutInfoCommand.getResult(PutInfoCommand.java:43)
           at org.eclipse.remote.internal.jsch.core.JschFileStore.putInfo(JschFileStore.java:322)
           at org.eclipse.core.filesystem.provider.FileStore.transferAttributes(FileStore.java:466)
           at org.eclipse.core.filesystem.provider.FileStore.copyFile(FileStore.java:203)
           at org.eclipse.core.filesystem.provider.FileStore.copy(FileStore.java:131)
           at org.eclipse.core.internal.filesystem.local.LocalFile.copy(LocalFile.java:127)
           at org.eclipse.ptp.internal.rdt.sync.git.core.GitRepo.uploadFilter(GitRepo.java:205)
           at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.doSync(GitSyncService.java:635)
           at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.synchronize(GitSyncService.java:544)
           at org.eclipse.ptp.rdt.sync.core.SyncManager$SynchronizeJob.run(SyncManager.java:80)
           at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
!SUBENTRY 2 org.eclipse.remote.core 4 0 2019-09-26 08:50:17.020
!MESSAGE Permission denied

On Thu, Sep 26, 2019 at 2:09 AM John Eblen <jeblen@xxxxxxx> wrote:
Hi

One possible solution is to add hooks that alter permissions after updating and merging.
The following bug report details doing this for a different case:


Also, please file a bug report. IIRC, PTP updates the exclude file in case the user modifies the
file filter settings. It may be possible to preserve the existing permissions.


Thanks for reporting this problem!
John Eblen

On Wed, Sep 25, 2019 at 8:55 AM 태식김 <taisikt@xxxxxxxxx> wrote:
Hi

I want to use multiple ssh accounts grouped together for team work.
So, I tried changing the remote .ptp-sync / info / exclude file permissions by force from "-rw-------" to "-rw-rw——".

However, when syncing from one ssh account to another ssh account, an error occurs. When I checked the remote exclude file, I noticed it was changed back to "-rw-------". Perhaps "PTP synchronized projects" change remote exclude file permissions when synchronizing … 

is there no other solution?
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/ptp-user

_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/ptp-user

_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/ptp-user

_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/ptp-user


Back to the top