Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
70 views
by Rookie
I'm using Webinoly on Ubuntu 18.04 on a lightsail instance. I have www-data enabled and I can transfer files just fine using winscp. But why can't I use www-data in a terminal session? How can I enable terminal/shell access to www-data?

I end up using a different username to use shell (it's the same username that installed webinoly and also enabled www-data in webinoly).

I run into permissions issues with this setup. For example, I can't save files in nano in any of the htdocs directories. So I end up switching to root which is a dangerous crutch.

Composer also runs into permissions issues and I tried running it as root to get around the issues, and it gave me a big yellow warning not to run as root. So I bailed out since running as root is a bad habit.

Any good solutions for this? Alternatively how should I change permissions?
by Rookie

For now I am just using the chown command to get around the issue. 

1 Answer

0 votes
by Expert

Recommendations:

  • Create a custom user for shell access with sudo privileges.
  • Root login should be disabled.
  • The www-data user is "jailed" to data folders (/var/www) and only for SFTP access, which is the preferred method to upload and modify your data files.
I don't feel comfortable giving so much access to www-data as you suggest. You should be very careful, it could result in a huge potential security hole.
by Rookie
Understood, and I think I found a suitable workaround
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...