2

I'm trying to structure an android project for continuous integration/continuous delivery via gradle and git.

The main code will be pulled from git on the build server without various files that contain keys.

Gradle needs these files to successfully build the project.

I will pull those files on the build server separately, but i'm looking for a common place to store these files both on my local env and on the build server. So that I can reference this location in ENVs, then point to that location in the gradle build file.

The build server runs in root mode, obviously my local is running as a user.

Where is a non-root accessible, public place in the linux file system besides /home/$USER?

The dist i'm using are ubuntu and debian.

2

The most official location for such files would be in /srv, which is for “site-specific data which is served by this system”.

Alternatively, you can use /home/autobuilder as the home directory of the autobuilder system user and store the files there.

Another common convention is to have a toplevel directory such as /net which contains one subdirectory per machine name, and put site-specific data there — that's probably the clearest convention if the files are stored in a single machine and mounted elsewhere over NFS or some other network filesystem.

Or you can choose a directory under /var/local — /var is a kind of default place for variable non-user-own data. Or you can use a separate toplevel directory: as the system administrator, you get to decide how you organize your storage, as long as it doesn't conflict with assumptions made by your distribution's tools (i.e. keep off directories that are reserved for the distribution).

2

/var/spool generally contains application specific directories with variable ownership and permissions. You could create something there.

Similarly, /var/opt and /opt. There's a bit of description here about the intended purpose of these places but it's really up to you.

The only issue is you do normally need superuser privileges to create a directory and set the ownership and permissions in those places, but then, this is true of /home as well. The only standard globally writable place is /tmp, but that is a bad idea because it is not guaranteed to be permanent storage.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.