Skip to content
Snippets Groups Projects
Commit 7c075db7 authored by Marius Raes's avatar Marius Raes
Browse files

ownership shared

parent b6d5fd2a
No related branches found
No related tags found
No related merge requests found
...@@ -19,9 +19,8 @@ mkdir /opt/data/shared ...@@ -19,9 +19,8 @@ mkdir /opt/data/shared
# this directory should be owned by root for security reasons # this directory should be owned by root for security reasons
# http://lists.mindrot.org/pipermail/openssh-unix-dev/2009-May/027651.html # http://lists.mindrot.org/pipermail/openssh-unix-dev/2009-May/027651.html
chown root:root /opt/data chown root:root /opt/data
chmod u=rwx,g=rx,o=rwx /opt/data chmod 755 /opt/data
sudo service smbd restart
# Everything below is based on the great top answer for this stack exchange question # Everything below is based on the great top answer for this stack exchange question
# https://unix.stackexchange.com/questions/503312/is-it-possible-to-grant-users-sftp-access-without-shell-access-if-yes-how-is-i # https://unix.stackexchange.com/questions/503312/is-it-possible-to-grant-users-sftp-access-without-shell-access-if-yes-how-is-i
...@@ -30,6 +29,11 @@ sudo service smbd restart ...@@ -30,6 +29,11 @@ sudo service smbd restart
addgroup --system allowssh addgroup --system allowssh
addgroup --system sftponly addgroup --system sftponly
chown <owern>:allowssh /opt/data/shared
chmod 775 /opt/data
sudo service smbd restart
# creates a user with no no password # creates a user with no no password
# /sbin/nologin is not needed but is done just to be safe # /sbin/nologin is not needed but is done just to be safe
adduser --disabled-password --gecos "" --home /home/project_owner <owner> adduser --disabled-password --gecos "" --home /home/project_owner <owner>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment