Please keep your posts in English (and add a translation to English to your previous post) so that everyone can follow the discussion, other languages are not appreciated here.
Ok, how to do that step-by-step:
First step: Create a new user-group, I will name this group uploaders
, but of course you can choose any name you want:
Second step: Change the group ownership of the folder in question (here /opt/application/mainuploadfolder
) to the new group, but keep root as user that owns the directory:
chown root:uploaders /opt/application/mainuploadfolder
You can check that this has worked using the command
ls -ld /opt/application/mainuploadfolder
The output should look like this:
drwxr-xr-x 2 root uploaders 4096 Jan 12 18:51 /opt/application/mainuploadfolder
Of course the creation date and time be different on your machine.
Third step: The output of the ls command has shown that the group already has the right to read and descend into the directory (drwxr-x
r-x), but we also need to add the write permission:
chmod g+w /opt/application/mainuploadfolder
The ls command from above should now show the changed permissions drwxrw
xr-x if everything worked.
The last step: Add your user to the new group, so that he can access the directory:
usermod -G uploaders -a USERNAME
You have to replace USERNAME with the actual username.
Now the user should have access to the directory, you can test that with logging in as the user and launching the command
That should create a new file named test in that directory. Alternatively you can simply try to upload a file.
For more information n the used commands have a look at