Ubuntu

linux(ubuntu) 파일 공유

공부운동 2021. 8. 9. 17:37

/etc/apache2/sites-available/000-default.conf 파일을 보면

 

DocumentRoot /var/www/html

 

위와 같이 HTML이 시작될 루트 디렉터리가 적혀있다.

해당 디렉터리를 2명의 user(server, manager)가 공유하도록 한다.

 

https://askubuntu.com/questions/873839/what-is-the-www-data-user

 

What is the www-data user?

I'm working through How To Serve Django Applications with uWSGI and Nginx on Ubuntu 16.04. At the end of the "Create a systemd Unit File for uWSGI" in the article they discuss the www-data user. W...

askubuntu.com

 

1
2
sudo chown www-data:www-data /var/www
sudo chmod -775 /var/www
cs

 

1
2
sudo usermod --G www-data server
sudo usermod --G www-data manager
cs

 

1
sudo chmod -R g+/var/www/html/
cs

 

umask 가 0002이므로 (user과 group만 쓸 수 있다.)