CHMOD on Windows, How to?

Lev Anni 41 Reputation points
2021-05-31T11:36:08.993+00:00

Hi,

As we all know, basic FTP client can't change file/folder permission through the client itself, rather I have to manually set it server side when they ask me. Now, I'm searching some workaround, like capturing client commands on server and then do ICACLS programmatically with say powershell. So my question is, how to get client FTP commands on server to do this?

Windows Server 2016, IIS

Thanks

Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 35,716 Reputation points
    2021-05-31T12:53:31.447+00:00

    The FTP logs are in C:\inetpub\logs\LogFiles\FTPSVC (default location). FTP doesn't log invalid commands, but you can see the user names who log in. Or try to log in.

    2021-05-31 12:04:38 ::1 - ::1 21 USER admin 331 0 0 
    2021-05-31 12:04:41 ::1 - ::1 21 PASS *** 530 
    

    If you see a 530 event for a user you could add them to some group to allow access. I would want to have some kind of verification step though and not just automatically add any account.

    I got tired of developers asking me to add accounts to local groups and restart their services so I build an ASPX web site to let them manage their "stuff". The site would authenticate the user (but not impersonate them) so I could then see what groups they were members of. We used names like "Application1-Owner". The users in that group could then manage any resource related to "Application-1". The web sites worker process ran as SYSTEM so I could programmatically do anything that I wanted to do. It wasn't trivial to build the site, but it saved me a ton of time by not having to deal with annoying "can you add" type requests.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.