Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running as a different user (gksudo) #1138

Closed
MetaChrome opened this issue Nov 3, 2013 · 7 comments
Closed

Running as a different user (gksudo) #1138

MetaChrome opened this issue Nov 3, 2013 · 7 comments

Comments

@MetaChrome
Copy link

The expected behavior is that it is possible (and implemented as a function of the software if there is further complexity to facilitating this) to fully run the client as an arbitrary user seperate from the logged in user.

It is critical to be able to disable owncloud client from access to the sync folder using chown.

A practical immediate reason being that I wish to place it's folder in an encrypted container and disallow access when the container isn't mounted by changing the unmounted path to an inaccessible user.

What occurs:

To run as a different user:

xhost +SI:localuser:owncloud
gksudo -u owncloud owncloud

The problem is that on the first run it specifies that owncloud requires a system tray paraphrased here:

ownCloud requires a working system tray. Please install a system tray application such as trayer. If you are running xfce follow these instructions: http://docs.xfce.org/xfce/xfce4-panel/systray

But still offers the configuration wizard. In future runs the wizard appears to fail to run. In either case it's not a particular issue as the client can be manually configured.

Either way the system tray is not functional and the behavior is undefined in general though it appear syncing works as the client is a fairly simple program. As the complexity grows, please facilitate this workflow in the architecture or specify a workflow to facilitate the entire spectrum of said functionality.

@danimo
Copy link
Contributor

danimo commented Nov 3, 2013

Are you by any chance running this on ubuntu and Unity?

@MetaChrome
Copy link
Author

Sorry I forgot to specify my env:

Ubuntu 12.04
Gnome Classic without Effects (metacity)

@MetaChrome
Copy link
Author

To clarify, practical problem disallowing with chown occcurs when running owncloud logged in root account.

Otherwise one can disallow access to folders with a different account. It should still be possible to run owncloud as an arbitrary user imo and as specified on root.

@danimo
Copy link
Contributor

danimo commented Nov 3, 2013

I understand your problem, but I understand why running as a different user solve the problem of accessing the unmounted directory. Why are you running a GUI as root in the first place? And why is it not sufficient to simply encrypt the current users home directory?

@MetaChrome
Copy link
Author

I run root because gksudo fails in some instances among other reasons.

Because owncloud recreates the path from the file system root. If it's running as root, how would one prevent it from recreating the folder in an unencrypted path?

/root/crypt/mnt is owned by root
when mounted, /root/crypt/mnt/sync is owned by owncloud
otherwise it doesn't exist and it's parent is inaccessible

if owncloud client is run as root, it just recreates the path and syncs defeating the point of the encryption.

@MetaChrome
Copy link
Author

Practically solved by automounting. Still though, the automatic creation of the path after configuration is kinda of an iffy workflow.

@ogoffart
Copy link
Contributor

ogoffart commented Jan 4, 2016

Closing old issue.
Running owncloud as a different user is not something we want to support officialy (altough i do it all the time for testing purposes and it works good enough)

@ogoffart ogoffart closed this as completed Jan 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants