NppFTP icon indicating copy to clipboard operation
NppFTP copied to clipboard

umask for chown, chgrp and chmod

Open atesin opened this issue 6 years ago • 4 comments

Description of the Issue

i am new to this, i could not find this feature everywhere, or is really hidden

i work in my php files by download it from my linux webserver with winscp, edit locally with npp and then upload it back, i want to work directly over my webserver with this plugin

i have no other account with login access but root, but my webserver and files uses the apache user, i want to set some default umask on user, group and permissions, as winscp does or folders/files

i want this feature specifically for this, but i think will be useful in many other cases

Steps to Reproduce the Issue

  1. create an ssh profile in nppftp, with my root user, and connect
  2. on profile settings there is no option to configure ch(own|grp|mod)
  3. on folder treeview right click some folder> create new file/folder, there is no option to set these
  4. on same treeview right click some element, there is no properties or option to change these
  5. create a new remote file, edit and save it .. most times the file is unaccessible by web

Expected Behavior

  1. that nppftp plugin make distinction beetween login credentials and file/folder permissions, as winscp does
  2. besides login, i would like a tab on profile settings to change default user/group/permissions for all folders/files
  3. just use nppftp to change the files in my web server transparently, and browse my website smoothly

Actual Behavior

i would have to connect by ssh and change chown by hand everytime... but actually i still download with winscp, edit, and upload, or trought extplorer, or with vim directly, i haven't switched yet to nppftp due this

atesin avatar Dec 13 '17 16:12 atesin

This is no supported feature. Some work was done, see PR #15 , but not in a mergeable state and the creator seems not to care for corrections.

chcg avatar Dec 14 '17 19:12 chcg

i have a special situation

i have a linux server with ssh account (root), different than web server account (apache) .. i want to upload files with my ssh account, but once uploaded change it to webserver user/grp account so php could read, write and run files ... i think this is a fairly common case in which users have ssh accounts different from webserver account (i wont give shell access to apache user!!)

don't criticize me about my security practices, the server is mine and i am the only user... i am asking a specific question

atesin avatar Mar 28 '18 22:03 atesin

See PR #15

chcg avatar Oct 25 '20 06:10 chcg

hi, i know you closed this issued ... but i think here and in #15 something were missed i see v0.30.9 will bring chmod for remote files and folders, that is great!... but what about chown and chgrp? i think described my problem in detail in this issue, and it wont resolve solely with chmod

without trying to be rude or demand anyting, still nppftp is a great plugin and i thank you... but i feel maybe you missed something when read this issue, so basically the problem is ...

  • my ssh (root) and httpd accounts are different
  • my httpd account have no shell ('/bin/nologin' at passwd file), and i like that way for security
    • in fact my root account is the only one with shell access ('/bin/bash'), all other ones are just for run services
  • so i can't connect ssh/scp/sftp with my httpd acccount, have to do it with my root account
  • when i do so and save some file, the file results belonging to 'root' and got inaccesible from web

as you see, if there were an option to also change user/group file at saving time, things will be different i know it also can be done by chmoding with '777', but is not elegant, correct or the secure way

atesin avatar Sep 05 '21 08:09 atesin