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

Default permission and owner on RioFS #29

Closed
tombou opened this issue Sep 28, 2013 · 9 comments
Closed

Default permission and owner on RioFS #29

tombou opened this issue Sep 28, 2013 · 9 comments
Assignees

Comments

@tombou
Copy link

tombou commented Sep 28, 2013

Hi, I'm new the RioFS but it's seems to be a beautiful peace of software from my test. I search to be able to put by default some other permission on files inside S3. I've tried some fuse options when I mounted it but without success. It's always root that own the folders and files and the default permission (755 if I remember well) is set. I want to be able to change the default permission and owner. I tried chmod and chown and these two done nothing... Maybe it's a misconfiguration only or really a RioFS issue. Here is my mount line:

riofs -o "allow_root,uid=33,gid=33" -c ~/.config/riofs/riofs.conf.xml --cache-dir /tmp s3bucketname /mnt/s3/

I'm using ubuntu 12.04. Does someone else face this issue?

@ghost ghost assigned wizzard Sep 28, 2013
@wizzard
Copy link
Member

wizzard commented Sep 29, 2013

Hello,

I've committed a small patch which should solve this issue.

Please update your copy, recompile, update config file and try to launch RioFS with the following command line parameters:

--uid=[user id]
--gid=[group id]
--fmode=[mode for all files]
--dmode=[mode for all directories]

This is an example:

riofs --uid=1001 --gid=1000 --dmode=0700 --fmode=0440 -c ../test.conf.xml test_bucket /mnt/

Could you please let us know how it works for you ?
Thank you !

@tombou
Copy link
Author

tombou commented Sep 29, 2013

Hi,

Seriously, I'm impressed. It works pretty well this patch! Thank you for this. The more I test RioFS, more I like it! It's seriously faster than S3FS, simpler and better so far.

Now, I'm facing another issue. I have a script which work well with s3fs but not at all with RioFS. Let me explain. This script before uploading into a folder check if there is enough available space. With s3fs, by default there is 260++ terabytes available but with RioFS the available space is the same as the occupied space.
There is a way to let know the system that Amazon S3 is huge?

Thank to you!

@wizzard
Copy link
Member

wizzard commented Sep 30, 2013

Hello,

could you please send me a simple copy of your script?
Basically I would like to see which function do you use for checking available space.

And thank you for helping us with the testing, it really helps !

@tombou
Copy link
Author

tombou commented Sep 30, 2013

Hi,

in fact the script use disk_free_space() and disk_total_space() functions in php. http://www.php.net/manual/en/function.disk-free-space.php
Otherwise, it can be bypassed easily in my script.

Thank you!

@wizzard
Copy link
Member

wizzard commented Oct 3, 2013

Hello,

I've committed a small patch which adds support for disk_free_space() / disk_total_space() functions.
Could you please give it a try ?

Thank you !

@tombou
Copy link
Author

tombou commented Oct 4, 2013

I tried it and it works perfectly. If I got another issue, I will contact you for sure!

Thank you, it's appreciated.

@tombou tombou closed this as completed Oct 4, 2013
@skorokithakis
Copy link

Hello,
are fmode/dmode for setting ACLs on S3? I am trying to set ACLs but I can't see a way. If not, would it be possible to map the POSIX permissions (ugo) to Amazon ACLs (owner/authenticated/everyone)? So, to make a file readable by everyone, I'd do "chmod o+r myfile".

If fmode and dmode can be used to make every file I write world-readable, it's fine by me, that's all I need anyway. The documentation could probably use some clarification, though, as it doesn't go into detail on either what "mode for all files" is (which files? Remote or just the local representations?) or what you need to set it to (is it the same octal argument chown accepts? What does each thing do if it's mapped to remote files?).

@wizzard
Copy link
Member

wizzard commented Nov 10, 2013

The current implementation of fmode / dmode sets only local files and folders permissions and are not connected to remote S3 ACLs. The idea behind these parameters is to be able to control who can read/write local filesystem.

fmode / dmode use standard octal arguments as values: --fmode=0666 will set -rw-rw-rw- mode for all files on local RioFS filesystem.

Thank you for pointing out the lack of fmode and dmode documentation, we will add clarification and some usage examples.

P.S. chmod currently isn't supported.

@skorokithakis
Copy link

I see, thanks!

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

3 participants