保护 linux 托管服务器上的网站文件
Protect website files on linux hosting server
我有一个托管在 linux 服务器上的网站,我的根目录是 (/home/MyAccountName)。
我的网站允许用户上传 c++/c 代码,编译并执行它。
问题是:
The executed user's program will have all the owner permissions (read - write -execute).
所以如果用户的代码是这样的:
system('cd / && rm -r MyAccountName');
执行时,我的所有网站文件将从服务器中删除。
问题是:
how to protect my website files from user's executed programs, and give it limited permissions.
备注
I have only one user on the linux server (the owner), and i can't create a new user in the server.
我有一个托管在 linux 服务器上的网站,我的根目录是 (/home/MyAccountName)。 我的网站允许用户上传 c++/c 代码,编译并执行它。
问题是:
The executed user's program will have all the owner permissions (read - write -execute).
所以如果用户的代码是这样的:
system('cd / && rm -r MyAccountName');
执行时,我的所有网站文件将从服务器中删除。
问题是:
how to protect my website files from user's executed programs, and give it limited permissions.
备注
I have only one user on the linux server (the owner), and i can't create a new user in the server.