You are my last hope, you've been killing on this task for about a week.
I need to create two users, both SFTP.
User1 must have access to /var/www and absolutely everything in the directory, full rights. (I seem to have been more or less successful with this, but sometimes the rights fly away, how can you deal with it?)
User2 must have access to /var/www/site/dev/project, also SFTP, but with access to bash so that he can deplot the back-end part in Java
They should both work in the same directory, because user1 also has access to the same directory as user2. root can also edit these files, but so that users do not have rights.
I've dug everything from YT with Hindus to complete GPT violence, I can't find a working solution, everything is constantly breaking down.
I'm asking for your help... Thank you in advance!
Ubuntu 22 04