You are not logged in.

#1 2018-01-04 07:59:56

jaydoc
Member
From: Chennai/Birmingham,AL
Registered: 2008-12-30
Posts: 89

Permissions for a folder in home for apache and nextcloud

Hi. I am not very familiar with permissions for files or folders. I have a data folder in my home directory that i want to access through both a simple apache http server and through the nextcloud interface.

What permissions should i use for this folder so that it will be as secure as possible while still accessible through both? Should it be owned by http or by me?

Thanks


It takes a very unusual mind to undertake the analysis of the obvious - A N Whitehead

Offline

#2 2018-01-04 09:12:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,863

Re: Permissions for a folder in home for apache and nextcloud

You'll have to elaborate on "secure" and "accessible", but I assume you want to be able to write and http still needs to be able to read those files, so own them yourself, give them a group that you share with the http user (in doubt create one) and turn them 640.

Offline

#3 2018-01-05 05:02:47

jaydoc
Member
From: Chennai/Birmingham,AL
Registered: 2008-12-30
Posts: 89

Re: Permissions for a folder in home for apache and nextcloud

seth wrote:

You'll have to elaborate on "secure" and "accessible", but I assume you want to be able to write and http still needs to be able to read those files, so own them yourself, give them a group that you share with the http user (in doubt create one) and turn them 640.

Can you elaborate please? How would I give the files a group? By giving ownership of the directory they are in to a user in that group? Thanks.


It takes a very unusual mind to undertake the analysis of the obvious - A N Whitehead

Offline

#4 2018-01-05 05:14:25

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Permissions for a folder in home for apache and nextcloud


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2018-01-05 12:07:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: Permissions for a folder in home for apache and nextcloud

jaydoc wrote:

Hi. I am not very familiar with permissions for files or folders.

Then get familiar.  It is ok to not know.  It is not okay to preserve your ignorance while expecting others to do your thinking for you.

Read `man chown` and `man chmod`.

Feel free to follow up with specific questions on how they work, or with a draft of the commands you plan to use if you want another set of eyes on them before you make changes.  But if you haven't read that documentation, there is nothing we could do here but recite it for you which would be 1) inefficient, 2) error prone, and 3) completely ridiculous.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB