Issue 321 in s3fs: no write permission for non-root user

4,369 views
Skip to first unread message

s3...@googlecode.com

unread,
Mar 5, 2013, 2:02:48 PM3/5/13
to s3fs-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 321 by fbor...@gmail.com: no write permission for non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Detailed description of observed behavior:

Non-root user is unable to write to mount point. This behavior was
observed in version 1.63. This was working in version 1.61.

What steps will reproduce the problem - please be very specific and
detailed. (if the developers cannot reproduce the issue, then it is
unlikely a fix will be found)?

1) As non-root user create a new directory.
mkdir test
2) Mount bucket
s3fs s3fs_test -o host=http://192.168.10.31/s3 -o nomultipart test -o
public_bucket=1
3) Attempt to write file and note permission denied
cp notes.txt test/.
cp: cannot create regular file `test/./notes.txt': Permission denied

===================================================================
The following information is very important in order to help us to help
you. Omission of the following details may delay your support request or
receive no attention at all.
===================================================================
Version of s3fs being used (s3fs --version):

Amazon Simple Storage Service File System 1.63
Copyright (C) 2010 Randy Rizun <rri...@gmail.com>
License GPL2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Version of fuse being used (pkg-config --modversion fuse):
2.9.2

System information (uname -a):

Linux frank-redhat 2.6.32-220.el6.i686 #1 SMP Wed Nov 9 08:02:18 EST 2011
i686 i686 i386 GNU/Linux

Distro (cat /etc/issue):

Red Hat Enterprise Linux Server release 6.2 (Santiago)
Kernel \r on an \m

s3fs command line used (if applicable):

s3fs s3fs_test -o host=http://192.168.10.31/s3 -o nomultipart test -o
public_bucket=1


/etc/fstab entry (if applicable):

s3fs syslog messages (grep s3fs /var/log/syslog):

Mar 5 09:55:12 frank-redhat kernel: fuse init (API version 7.13)
Mar 5 09:55:12 frank-redhat s3fs: init $Rev: 384 $


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

s3...@googlecode.com

unread,
Mar 14, 2013, 6:33:30 PM3/14/13
to s3fs-...@googlegroups.com

Comment #1 on issue 321 by ke...@bitcasa.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

I found this issue also. I might have gotten around it by chmod'ing the
root dir to 777, but that'd be dumb. :)

The function check_parent_object_access() was looking at all parent
directories, including the root dir, for whatever mask it was provided
(usually execute + write access). It should only require that on the
immediate parent, not the parents of parents. They only need execute all
the way to the root.

Attached is a patch against 1.63.



Attachments:
s3fs-1.63.fixed.patch 965 bytes

s3...@googlecode.com

unread,
Mar 14, 2013, 6:34:30 PM3/14/13
to s3fs-...@googlegroups.com

Comment #2 on issue 321 by black...@gmail.com: no write permission for

s3...@googlecode.com

unread,
Mar 18, 2013, 10:36:48 AM3/18/13
to s3fs-...@googlegroups.com

Comment #3 on issue 321 by nik.mar...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

I just patched s3fs.cpp and rebuilt, and now all files in my buckt have 0
permissions, and are not accessible by anyone:
My bucket's mount point:
drwxr-xr-x 1 root root 0 Dec 31 1969 my.bucket.dir

Files in my bucket:
---------- 1 root root 33347160 Feb 13 15:46 backup.tgz

Alsok note the date on the mounted folder. I'm not sure this bug is fixed
yet.

s3...@googlecode.com

unread,
Mar 23, 2013, 12:01:37 PM3/23/13
to s3fs-...@googlegroups.com

Comment #4 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hello,

The s3fs v1.63 is using file(object) access permission like other unix file
system.
Maybe, this problem is the permission of root directory(mount point).

I think that your mount point(directory) does not have write permission for
other user.
s3fs looks mount point directory's permission.
if you can, please change permission as 777.

This code is in my_fuse_opt_proc() function in s3fs.cpp.
------------
if(stat(arg, &stbuf) == -1) {
fprintf(stderr, "%s: unable to access MOUNTPOINT %s: %s\n",
program_name.c_str(), mountpoint.c_str(), strerror(errno));
return -1;
}

root_mode = stbuf.st_mode; // save mode for later usage
------------

Please try to change mount point permission.

Regards,

s3...@googlecode.com

unread,
Apr 2, 2013, 3:09:26 PM4/2/13
to s3fs-...@googlegroups.com

Comment #5 on issue 321 by tcd...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

As mentioned in #323, downgrading to 1.62 eliminates the permission errors.
Worked for me.

s3...@googlecode.com

unread,
Apr 2, 2013, 3:18:10 PM4/2/13
to s3fs-...@googlegroups.com

Comment #6 on issue 321 by ke...@bitcasa.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Downgrading makes it a single-user filesystem. It fixes it because it
removes the ability to have ownership.

Changing the root dir to 777 is a not a fix. That is just a workaround to
fix incorrect logic. One should not require all users have write access to
the root dir (danger!) when modifying subdirectories two or more levels
deep. Only the immediate parent dir needs write, and all "grandparents"
need execute.

s3...@googlecode.com

unread,
Apr 2, 2013, 10:35:58 PM4/2/13
to s3fs-...@googlegroups.com

Comment #7 on issue 321 by ddarby...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

I confirm the same issue. I cannot write to mount point as non-root user:

touch: cannot touch `test.txt': Permission denied

s3...@googlecode.com

unread,
Apr 4, 2013, 8:29:56 PM4/4/13
to s3fs-...@googlegroups.com
Updates:
Status: Accepted

Comment #8 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi, all

Sorry for this issue.
I will update s3fs soon, it will be able to check right for permission.
Please wait new version and check it.

s3...@googlecode.com

unread,
Apr 6, 2013, 1:57:25 PM4/6/13
to s3fs-...@googlegroups.com
Updates:
Status: Fixed

Comment #9 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Updates leanest version(v1.66).
Please check it, and please let me know when you find a bug.

Regards,

s3...@googlecode.com

unread,
Apr 8, 2013, 9:54:24 PM4/8/13
to s3fs-...@googlegroups.com

Comment #10 on issue 321 by ddarby...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

I'm testing 1.66 but still receiving 'Permission denied' as non-root user.
Can you please provide me with an example of proper mounting options?

I've tried from my non-root account:

s3fs s3-bucket s3-mount (can't access folder)
s3fs -o allow_other s3-bucket s3-mount (access good, Permission denied
errors)
s3fs -o allow_other,uid=0,gid=2300 s3-bucket s3-mount (access okay, drive
is mounted as 'developer' group good, Permission denied errors)

s3...@googlecode.com

unread,
Apr 8, 2013, 9:58:44 PM4/8/13
to s3fs-...@googlegroups.com

Comment #11 on issue 321 by ddarby...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Btw, I'm trying these new options on an S3 drive that was running under
1.62. Should the new options from 1.66 work on this existing bucket? or do
have to rebuild a new S3 bucket from scratch for 1.66 to properly work?

s3...@googlecode.com

unread,
Apr 8, 2013, 11:12:44 PM4/8/13
to s3fs-...@googlegroups.com

Comment #12 on issue 321 by ddarby...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Here are my new findings after more testing:

- Created a new S3 bucket
Root User: $ s3fs -o allow_other,uid=0,gid=2301 S3-bucket /mnt/S3-mount
(works)

2301 is developer group

Test 1:
Non-Root (developer): $ cd /mnt/s3-mount (works); mkdir test (Permission
denied)

Result: developer cannot create files or directories from within
parent/root s3 directory

Test 2:
Root: $ mkdir /mnt/s3-mount/test2
Root: $ chmod 775 /mnt/s3-mount/test2
Non-Root (developer): $ cd /mnt/s3-mount/test2; touch test.txt (Permission
Denied)

Result: chmod does not work even thought the s3 drive is mounted via
gid=2301 (developer)

Test 3:
Root: $ mkdir /mnt/s3-mount/test3
Root: $ chown root:developer /mnt/s3-mount/test3
Non-Root (developer): $ cd /mnt/s3-mount/test3; touch test.txt (Permission
Denied)

Result: chown does not work even thought the s3 drive is mounted via
gid=2301 (developer)

Test 4:
Root: $ mkdir /mnt/s3-mount/test4
Root: $ chmod 775 /mnt/s3-mount/test4
Root: $ chown root:developer /mnt/s3-mount/test4
Non-Root (developer): $ cd /mnt/s3-mount/test4; touch test.txt (Works!)

Result: files can only be created by non-root user only IF the root user
preforms 'chmod' & 'chown' together

FYI, When logging into AWS and viewing s3-bucket/test4/test.txt the
following meta is found:

x-amz-meta-uid = 2000
x-amz-meta-gid = 2000

It appears both the uid and gid are the same. Shouldn't the meta data be??

x-amz-meta-uid = 2000
x-amz-meta-gid = 2301

??

Furthermore, it appears first child folders of /mnt/s3-mount do not inherit
root privileges. The following should work:

Root: $ s3fs -o allow_other,uid=0,gid=2301 S3-bucket /mnt/S3-mount
Non-Root (developer): $ cd /mnt/s3-mount; mkdir test5 (Permission denied)

Summary: only if the root user creates a directory inside /mnt/s3-mount and
THEN chmod AND chown that directory can the 'developer' group create files
inside the first child folder. Otherwise permissions do not work as
expected.

s3...@googlecode.com

unread,
Apr 9, 2013, 2:23:39 AM4/9/13
to s3fs-...@googlegroups.com

Comment #13 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi,

At first, I want to know the environment that you tried.
(ex. do you run the s3fs by root user?)

I tested the s3fs v1.66, it worked without problem.
I wrote my simple testing case below.
--------------------
*** mount point
$ ls -la /mnt
total 20
drwxr-xr-x. 5 root root 4096 Apr 4 15:35 .
dr-xr-xr-x. 23 root root 4096 Apr 4 11:48 ..
drwxr-xr-x 2 root root 4096 Jan 7 10:19 s3

*** /etc/fstab for mount command
s3fs#mybucket /mnt/s3 fuse allow_other 0 0

I run 'mount' command as 'mount /mnt/s3' manually, and check by 'df'
command.

*** run s3fs by command line( run on root user )
/usr/local/bin/s3fs mybucket /mnt/s3 -o allow_other

When I don't have s3fs's entry in fstab or I do for debugging s3fs, I run
s3fs manually.
--------------------

After I tried both case, I could not get unexpected results.
My bucket has child directories, I can write(touch) files and make
directories in those dir.
--------------------
$ ls -la /mnt/s3/test
total 1
drwxrwxrwx 1 root root 0 Mar 4 22:05 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..

$ mkdir /mnt/s3/test/testdir
$ touch /mnt/s3/test/testfile

$ ls -la /mnt/s3/test
total 1
drwxrwxrwx 1 root root 0 Mar 4 22:05 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..
-rw-r--r-- 1 ggtakec users 0 Apr 9 15:06 testfile
drwxr-xr-x 1 ggtakec users 0 Apr 9 15:06 testdir
--------------------

If you can run s3fs with "-f" option, you get some information from s3fs
process.
This information is not friendly, but it is useful to debug.
Please try it and let me know more information.

Regards,

s3...@googlecode.com

unread,
Apr 9, 2013, 2:27:52 AM4/9/13
to s3fs-...@googlegroups.com

Comment #14 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

I'm sorry for not reading
#12(http://code.google.com/p/s3fs/issues/detail?id=321#c12).
I will read it soon. please wait.

s3...@googlecode.com

unread,
Apr 9, 2013, 2:56:59 AM4/9/13
to s3fs-...@googlegroups.com
Updates:
Status: Accepted

Comment #15 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Now, the s3fs(v1.66) do not care for uid/gid mount option.
Then your result is correct.
You can escape only this issue by setting the group(id) to a target
directory.

I re-open this issue, and try to change codes for supporting uid/gid option.

s3...@googlecode.com

unread,
Apr 10, 2013, 4:05:23 AM4/10/13
to s3fs-...@googlegroups.com

Comment #16 on issue 321 by downch...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

I'm hitting a similar issue to #3; only "root" is able to access files
regardless of who I mount as. And all files have a default permission of
non-read.

I have tried using: uid, gid, allow_other, and umask to solve this; they
do "fix" the ls command; but they still do not allow any users to actually
read or touch files.

s3fs: 1.66, fuse: 2.9.2

s3...@googlecode.com

unread,
Apr 11, 2013, 3:18:42 AM4/11/13
to s3fs-...@googlegroups.com

Comment #17 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi,

Your comment #12 is not same as my result by v1.66.
I run s3fs with below options.( run manually)

# s3fs mybucket /mnt/s3 -o allow_other

The mount point(/mnt/s3) is 755 permission and root/root(owner/group).

$ ls -la /mnt
total 16
drwxr-xr-x. 5 root root 4096 Apr 4 15:35 .
dr-xr-xr-x. 23 root root 4096 Apr 4 11:48 ..
drwxr-xr-x 1 root root 0 Jan 1 1970 s3

Then no-root user can not make files or directories in /mnt/s3.
So, I make a directory in /mnt/s3 by root user, and change mode/owner.

# mkdir /mnt/s3/test
# chown root:users /mnt/s3/test
# chmode 755 /mnt/s3/test
# ls -la /mnt/s3
total 6
drwxr-xr-x 1 root root 0 Jan 1 1970 .
drwxr-xr-x. 5 root root 4096 Apr 4 15:35 ..
drwxrwxr-x 1 root users 0 Apr 11 15:36 test

Change user "test" who is "users" group(or listed "users" entry in
/etc/group file), and make a file and a directory.

$ whoami
test
$ mkdir /mnt/s3/test/sampledir
$ echo "test" > /mnt/s3/test/samplefile
$ ls -la /mnt/s3/test
total 1
drwxrwxr-x 1 root users 0 Apr 11 15:36 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..
drwxr-xr-x 1 test users 0 Apr 11 16:01 sampledir
-rw-r--r-- 1 test users 5 Apr 11 16:02 samplefile
$ cat /mnt/s3/test/samplefile
test

*******
I do not use "uid" and "gid" option(because these option is not supported
by s3fs), but I think I do what you want to do.
If I mis-understand what you want to do, so sorry please let me know again.

And your comment #3 which means no-permission file, is it correct?
If the file(object) does not have "x-amz-meta-***" headers, s3fs can not
decide the permission for this file.
Then s3fs uses "000" mode for this file.
If you need to access by no-root user, you change the mode for this file.
After that, the file(object) has "x-maz-meta-***" headers.

Please let me know your opinion.

Thanks

s3...@googlecode.com

unread,
Apr 11, 2013, 5:51:27 AM4/11/13
to s3fs-...@googlegroups.com

Comment #18 on issue 321 by baptiste...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi everyone,

Just as an update for this post, I am having the same issue with s3fs 1.65
or 1.66.

I got good rights on the mount point (except size/date):
drwxr-xr-x 1 root root 0 1970-01-01 01:00 mnt-s3/

but not on the files contained in the mounted folder:
---------- 1 root root 4 2013-04-11 07:53 test_s3rights.txt

I think this problem is the same as highlighted by the other users above.

Thanks in advance for all the help you will can bring to us.

Baptiste

s3...@googlecode.com

unread,
Apr 11, 2013, 6:04:29 AM4/11/13
to s3fs-...@googlegroups.com

Comment #19 on issue 321 by baptiste...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi again,

I didn't precise that point on my previous message but I can't read the
file, I get this error :
cat: test_s3rights.txt: Permission denied

I just tried with s3fs 1.61 and it's working fine. Even if the rights don't
appear, I can read the file.

Thanks

s3...@googlecode.com

unread,
Apr 11, 2013, 10:07:59 PM4/11/13
to s3fs-...@googlegroups.com

Comment #20 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi, all

s3fs after v1.63 are different from v1.61, s3fs after v1.63 are using
user/group/mode permission for accessing object.
s3fs before v1.62 always accesses all object as "root".
So that, you can access all objects.

About this issue, I could not reproduce, then if you can please let me know
about below result.

1) About the file(object) which mode is displayed "----------"(000)
Was this file uploaded by s3fs?
If this file is uploaded by other S3 clients(s3cmd etc), the file does
not have "x-amz-meta-mode" header.
Then because s3fs can not decide mode, it is displayed as 000.

2) About the file(object) headers
If somebody can do, I want to know the headers of this trouble
file(object).

When we call S3 API(HEAD) directly, we can get additional headers for
the object.
If the file(object) path is "mybucket/file", we can send like below
request.
---------------------------------------------
HEAD /file HTTP/1.1
Host: mubucket.s3.amazonaws.com
content-length: 0
Authorization: AWS *******
x-amz-date: Fri, 12 Apr 2013 01:51:59 +0000
---------------------------------------------

S3 will return like below response for this request.
---------------------------------------------
HTTP/1.1 200 OK
x-amz-id-2: ******
x-amz-request-id: *****
Date: Fri, 12 Apr 2013 01:52:00 GMT
x-amz-meta-gid: 0
x-amz-meta-mode: 33188
x-amz-meta-mtime: 1354806000
x-amz-meta-uid: 0
Last-Modified: Fri, 08 Mar 2013 02:32:06 GMT
ETag: "*******"
Accept-Ranges: bytes
Content-Type: text/plain
Content-Length: ***
Server: AmazonS3
---------------------------------------------

If you can not call S3 API directly, you can use s3cmd command instead
of calling.
---------------------------------------------
$ s3cmd -d info s3://mybucket/file
---------------------------------------------
This command displays the result with debugging information.
You can see like below lines in this result.
---------------------------------------------
DEBUG: Sending request method_string='HEAD', uri='/file', *******
DEBUG: Response: {'status': 200, 'headers':
{'x-amz-meta-uid': '0', 'content-length': '5', *****
---------------------------------------------

I want to know what headers is in response. Please let me know the
response which you recieve.

Thenks in advance in your help.

Regards,

s3...@googlecode.com

unread,
Apr 12, 2013, 3:53:45 AM4/12/13
to s3fs-...@googlegroups.com

Comment #21 on issue 321 by baptiste...@gmail.com: no write permission for
First of all, thanks for this explanation about difference since 1.63
version!

Regarding the file rights displayed as "----------"(000), whatever the
version used, it's the same display. The difference is that in 1.61 you can
open the file (with "cat" command for example) whereas it's not possible
since 1.63.

Here are my answers to your questions to help you understanding that
behavior:
1) I've tried uploading a file with different tools:
- AWS S3 Console (Web Interface): failed (no rights)
- boto library (python API): failed (no rights)
- s3fs (this library): passed (rights appear) but I have to copy files
with root rights because I can't change the ownership of the mounted point
(I got "chown: changing ownership of `mnt-s3/': Input/output error")

2) Regarding the headers, I tried on a file uploaded with AWS Console and
there is no "x-amz-meta-mode" set up. This tag appears if I upload with
s3fs directly. It seems that that this missing mode is the source of this
problem...
So I tried to set up this meta tag while uploading a file from AWS Console,
and it works fine, I can read my file !

Many thanks for highlihting that point !

But nevertheless, would you have an answer to the first point and
the "chown: changing ownership of `mnt-s3/': Input/output error" when
trying to set up rights access to the mount point ?

Thanks for all your help,

Regards

s3...@googlecode.com

unread,
Apr 12, 2013, 6:34:59 AM4/12/13
to s3fs-...@googlegroups.com

Comment #22 on issue 321 by ke...@bitcasa.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

With 1.63+ it expects to mount as root with allow_other flag. The ownership
of the mountpoint's root is root. It cannot be changed. Make a subdirectory
and chown as appropriate for the non-root user accessing the resource. I
have not verified the patches mentioned in this thread, but if X permission
as been implemented as advised then subdir should work without chmod 777
/mount/point.

s3...@googlecode.com

unread,
Apr 13, 2013, 11:28:22 AM4/13/13
to s3fs-...@googlegroups.com
Updates:
Status: Fixed

Comment #23 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi, baptiste.gazui and all

Thanks for replying.

The s3fs handles the mode at mount point as same as it's
permission(mode/owner/group).
If you need to make a file or a directory right under mount point, you have
to have a right for writing.
I think that there are three way for this method.
One, the mount point permission has a mode for allowing user who need to
write.
The other way, root user makes a directory or a file and allows to
accessing it for other user.
Last, you can upload the file( or directory as 0 byte) by other S3 client
tools with "x-amz-meta-***" header.

I think I close this issue, if you don't want to close, please let me know.
If you need more function for s3fs like this issue(about permission),
please post new issue with a concrete content.

Regards,

s3...@googlecode.com

unread,
Apr 13, 2013, 11:32:43 AM4/13/13
to s3fs-...@googlegroups.com

Comment #24 on issue 321 by ddarby...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Before you close, have you tested sticky gid bit?

chmod 2770 /mnt/s3-bucket/test
touch /mnt/s3-bucket/test/newfile.txt
ls -la /mnt/s3-bucket/test

?

For non-root users maintaining the developer gid would be helpful so shared
users (ie. developer) can edit files

s3...@googlecode.com

unread,
Apr 13, 2013, 12:54:46 PM4/13/13
to s3fs-...@googlegroups.com

Comment #25 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Now, s3fs does not care for stikybit( and setuid, nosetuid, suid, nosuid
options).
But maybe s3fs should allow to set stikybit, it is needed to fix.
I can not fix this issue immediately , but will fix about stikybit and
nosuid or nosetuid options in the future.

I branched this issue about stikybit as (Issue: 331)
http://code.google.com/p/s3fs/issues/detail?id=331

s3...@googlecode.com

unread,
Apr 19, 2013, 11:01:06 AM4/19/13
to s3fs-...@googlegroups.com

Comment #26 on issue 321 by djrobb...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Finally got this working.

Removed uid and gid from my fstab line for s3fs

Mountpoint is 755 root:root

As root, cd to the mountpoint once mounted.

Some of my folders are not accessible, because they were created with 3rd
party client. No problem; I'll re-create them and move the files.
Shouldn't be a problem.

mkdir test

chown user:usergroup test (the user I want to use to access the files)

su user (become that user)

cd test

touch file.txt

WORKS!

s3...@googlecode.com

unread,
Apr 24, 2013, 9:15:18 PM4/24/13
to s3fs-...@googlegroups.com

Comment #27 on issue 321 by marclij...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

I can not make it work here with the 1.63 version.

Debugging with s3cmd ($ s3cmd -d info s3://mybucket/file) shows that uid
and gid are correctly set in the response (same as in S3 console meta-data,
and same as output by ls -l). In spite of all that, after su'ing into the
user with this specific uid/gid pair, I can not create a directory or file.
I get a "Permission is denied" error.

s3...@googlecode.com

unread,
May 16, 2013, 4:15:13 AM5/16/13
to s3fs-...@googlegroups.com

Comment #28 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi all

I uploaded new version v1.69.
It supported uid/gid mount option and fixed some bugs about this issue.
And Issue 331 is closed.
(http://code.google.com/p/s3fs/issues/detail?id=331)

Please try to use new version and check it.
If you have furthermore problem, please post new issue.

Thanks a lot.

s3...@googlecode.com

unread,
Aug 16, 2013, 3:53:14 PM8/16/13
to s3fs-...@googlegroups.com

Comment #29 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi,

I updated new revision as r465, it changes about allow_other/uid/gid
options.
I think this rev helps this issue.

Please check it if you can.

Thanks in advance.

s3...@googlecode.com

unread,
Aug 21, 2013, 4:33:16 PM8/21/13
to s3fs-...@googlegroups.com

Comment #30 on issue 321 by ddarby...@iconicgroup.ca: no write permission
Permissions are wide open from the parent mounted point. ie:

gid=2300='sysadmin'
gid=2301='developer'

(root)$ s3fs my-bucket /mnt/my-bucket -o default_acl=public-read -o
use_cache=/tmp -o uid=0 -o gid=2300 -o umask=007 -o allow_other

(root)$ ls -la /mnt

drwxrwx--- 1 root sysadmin 0 Dec 31 1969 my-bucket

Good!!

(user with group 'developer')$ cd /mnt/my-bucket; mkdir test; touch test.txt

Bad!!

Developer SHOULD NOT be able to create files and directories from the
parent folder /mnt/my-bucket

s3...@googlecode.com

unread,
Aug 21, 2013, 10:44:11 PM8/21/13
to s3fs-...@googlegroups.com

Comment #31 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi,

Thank you for reporting my fault.
This is my miss coding.
I updated new revision as r470, please use and check it.

Regards,

s3...@googlecode.com

unread,
Aug 23, 2013, 3:27:45 PM8/23/13
to s3fs-...@googlegroups.com

Comment #32 on issue 321 by thebengr...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Why are files written by other applications in S3 only downloadable by root
and not a general user ?

s3...@googlecode.com

unread,
Aug 26, 2013, 12:20:57 AM8/26/13
to s3fs-...@googlegroups.com

Comment #33 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi,

Do you mention about "default_acl" option as "public-read" ?
If it is correct, the "default_acl" option means what permission s3fs
writes(updates) a object with.
If you are set public-read, s3fs updates a object which is readable by any
user in bucket.

Reagrds,

s3...@googlecode.com

unread,
Aug 27, 2013, 7:54:39 PM8/27/13
to s3fs-...@googlegroups.com

Comment #34 on issue 321 by ned.wolp...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Using 1.73 on AmazonLinux AMI. Mounting as root:

Goal is to mount the drive read-only and let any other user on the system
see and read the files.

/usr/local/bin/s3fs bucket /mnt -oallow_other,ro,umask=000

sudo su - developer
cd /mnt; ls -l
-rwxrwxrwx 1 root root 15134771 Aug 27 2013 VIDEO0005.mp4
-rwxrwxrwx 1 root root 95393429 Aug 27 16:22 VIDEO0006.mp4
# 6 was uploaded via s3fs when in rw mode, 5 was uploaded via the s3 admin
console

file *
VIDEO0005.mp4: regular file, no read permission
VIDEO0006.mp4: ISO Media, MPEG v4 system, version 1

Not sure how to fix this.... or if its even related to this issue. Maybe
the umask is just for show then?

s3...@googlecode.com

unread,
Aug 29, 2013, 2:27:29 AM8/29/13
to s3fs-...@googlegroups.com

Comment #35 on issue 321 by ggta...@gmail.com: no write permission for
non-root user
http://code.google.com/p/s3fs/issues/detail?id=321

Hi,

I'm sorry that I do not understand about umask options strictly.
So that, I updated new revision r480 which is fixed this issue about umask.
It works good about umask, please check it.

Thanks in advance.

s3...@googlecode.com

unread,
Oct 28, 2014, 6:20:05 AM10/28/14
to s3fs-...@googlegroups.com

Comment #36 on issue 321 by aktar...@gmail.com: no write permission for
non-root user
https://code.google.com/p/s3fs/issues/detail?id=321

at "rw" instead to the filesystem mount in /etc/fstab. That will give r
permission to group/others for any files copied to the bucket.

s3...@googlecode.com

unread,
Oct 28, 2014, 6:21:06 AM10/28/14
to s3fs-...@googlegroups.com

Comment #37 on issue 321 by aktar...@gmail.com: no write permission for
non-root user
https://code.google.com/p/s3fs/issues/detail?id=321

add "rw" instead to the filesystem mount in /etc/fstab. That will give r

s3...@googlecode.com

unread,
Nov 21, 2014, 3:36:50 AM11/21/14
to s3fs-...@googlegroups.com

Comment #38 on issue 321 by olivier....@gmail.com: no write permission for
non-root user
https://code.google.com/p/s3fs/issues/detail?id=321

add umask=022 ,work fine !
Reply all
Reply to author
Forward
0 new messages