1

I am currently trying to setup my raspberry pi as a webserver that serves files from a cifs share.

The problem I run into is that my while using ssh, my pi creates all new files/folder with a non existent user.

pi@raspberrypi:/media/www $ ls -lsa
total 4
0 drwxrwxrwx+  4 root pi      0 Sep  3 15:37 .
4 drwxr-xr-x   4 root root 4096 Sep  3 13:25 ..
0 drwxrwxrwx   3 1001 pi      0 Sep  3 15:28 .recycle
0 drwxr-xr-x  13 1001 pi      0 Sep  3 15:28 ttp-master

pi@raspberrypi:/media/www $ mkdir non-sudo

pi@raspberrypi:/media/www $ sudo mkdir sudo

pi@raspberrypi:/media/www $ ls -lsa
total 4
0 drwxrwxrwx+  6 root pi      0 Sep  3 15:43 .
4 drwxr-xr-x   4 root root 4096 Sep  3 13:25 ..
0 drwxr-xr-x   2 1001 pi      0 Sep  3 15:43 non-sudo
0 drwxrwxrwx   3 1001 pi      0 Sep  3 15:28 .recycle
0 drwxr-xr-x   2 1001 pi      0 Sep  3 15:43 sudo
0 drwxr-xr-x  13 1001 pi      0 Sep  3 15:28 ttp-master

When I create files using the gui on my pi, it is also owned by the same user and group.

0 drwxr-xr-x   2 1001 pi      0 Sep  3 16:02 gui

I cannot access any files via the webserver configured to the /media/www directory, all it shows is error 403 forbidden.

When I create a new folder from my windows machine using the same share, the permissions appear as:

0 drwxrwxrwx   2 pi   pi      0 Sep  3 16:04 windows-gui

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.