l have a website that is hosted in linux server, and my root is (/home/MyAccountName). My website allows users to upload there c++/c code, compile, and execute it. The problem is: The executed user’s program will have all the owner permissions (read – write -execute). so if the user’s code is like : system(‘cd / && rm -r MyAccountName’); when
Tag: permissions
Linux tar command ignore files which permission denied
I encountered an issue when I tar a directory. There is a backup file in one of the sub directory created by another user and it doesn’t allow other user to read. so my tar command was failed. My question is: Can I ignore this file (actually this file is not important) and tar the rest of the files/directories? Answer
Mount a file in read/write mode for all in Docker
On my MacOS laptop I mounted a file in my newly created container using: However, apache seems to have issues to read the file. We can learn by running a bash command in the container that the read permissions is not applied for all: I tried the same process on docker installed on a Linux Debian 8 machine and I
chown and chmod doesn’t work (Raspberry Pi 2 – Jessie)
I would like to make a fileserver at home using Raspberry Pi 2. Currently there are 3 users: root, pi and alma. My connected external drive is mounted automatically to /media/pi/TOURO I would like to share “Share” directory on this drive for “alma” users (with read+write permissions) The problem is that when I try to change owner of the “Share”
PHP: creates file but can’t append with (apparently) correct server permissions (LAMP)
I have seen many questions and answers on this topic but none seem to help my situation. My PHP code is successfully creating a new logfile, but then cannot access that file to append further info, close it, etc. I am migrating an application from local XAMPP onto LAMP: hence problem only showing up now due to Windows/XAMPP giving no
ssh key gen Permission Denied [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
Why can’t this user delete this file?
If I do: I see: If I sudo to root and then su to jenkins, I should be able to delete this, yes? Other relevant information about the directory and its parent: If I do: then I see than the user “jenkins” has been added to the “root” group: But if I: I get: Why is permission denied? Answer As
In a setuid root program, how to check that the current user (that root is doing the work for) owns a file?
The use case is a mount tool, I want to restrict mounting (a unionfs(r+x dir, squashfs) ) to files owned by the caller. I know about fusefs, But I’d like to use overlayfs and squashfs in the kernel. Answer So long as you haven’t called setuid() or setreuid() yet, you can use getuid() to get the user ID of the
Running a bash install script as root – how to handle regular users’ files?
I am writing some bash scripts to install and configure some programs. Because the script needs to install packages – I run the scripts as root – which itself is no problem (i.e. I have root privileges etc). However once the packages are installed the script needs to configure normal user files and fetch plugins etc, e.g. sed i s/xxx/mod_to_make/
what is the meaning of the lost+found directory on linux [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question