sudo mount /dev/sdb1 /media/usb2
dbpath = /media/usb2/mongodb
me@medev:/media/usb3$ ls -lah
total 36K
drwx------ 3 me me 16K Nov 10 16:13 .
drwxr-xr-x 5 root root 4.0K Nov 10 16:08 ..
drwx------ 2 me me 16K Nov 10 16:13 mongodb
me@medev:/media/usb2$ sudo chown -R mongodb:mongodb .
chown: changing ownership of ‘./mongodb’: Operation not permitted
chown: changing ownership of ‘.’: Operation not permitted
me@medev:/media/usb2$
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/e0e4866a-d7c1-4baa-ba9b-7381eaa67129%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 968613887 484305920 83 Linux
/dev/sda2 968615934 976771071 4077569 5 Extended
/dev/sda5 968615936 976771071 4077568 82 Linux swap / Solaris
Disk /dev/sdc: 7803 MB, 7803174912 bytes
241 heads, 62 sectors/track, 1019 cylinders, total 15240576 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdc doesn't contain a valid partition table
me@medev:/media/me/mongotest$ ls -lah
total 28K
drwx------ 4 me me 4.0K Nov 11 09:05 .
drwxr-x---+ 3 root root 4.0K Nov 11 09:18 ..
drwx------ 2 root root 16K Nov 11 09:01 lost+found
drwxr-xr-x 2 root root 4.0K Nov 11 09:05 mongodb
me@medev:/media/me/mongotest$
2014-11-11T09:27:52.635-0500 [initandlisten] allocator: tcmalloc
2014-11-11T09:27:52.635-0500 [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/media/me/mongotest/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2014-11-11T09:27:52.635-0500 [initandlisten] exception in initAndListen std::exception: boost::filesystem::status: Permission denied: "/media/me/mongotest/mongodb", terminating
2014-11-11T09:27:52.635-0500 [initandlisten] dbexit:
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/5AxQytP4yLY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAFtje5NUc_SfyHWvedKgb1quUCYfPezCWLHoemO10Bfb_-Rt4w%40mail.gmail.com.
/dev/sdb1 on /media/usb3 type vfat (rw,umask=000)
/dev/sdc on /media/me/mongotest type ext4 (rw,nosuid,nodev,uhelper=udisks2)To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CALrZDSiiv-wiVp__Awg%3DFg3y1Z4QLH3ewqnjDJpMqMRPXjnb3Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAFtje5NEm9AZ2deOmCn5KSMWhqNtymYpVq%3DykowvgCQ4d2ZZ1Q%40mail.gmail.com.
Just to test whether the ACL permissions are working or not, I did the following:
me@medev:~$ getfacl /media/me/mongotest/mongodb/ getfacl: Removing leading '/' from absolute path names # file: media/me/mongotest/mongodb/ # owner: root # group: root user::rwx group::r-x group:mongodb:rwx group:testers:rwx mask::rwx other::r-x
me@medev:~$ su test Password:
test@medev:/home/me$ cd /media/me/mongotest bash: cd: /media/me/mongotest: Permission denied test@medev:/home/me$ cd /media/me/mongotest/mongodb bash: cd: /media/me/mongotest/mongodb: Permission denied test@medev:/home/me$
So it would seem that I'm doing something wrong with the way I'm creating / adding these permissions... because it's failing for both users / groups.