how all users gain read/write/delete/modify access to everyone's files/folders in an ext4 partition

Asked by jpgrms

i setup as one partition (let's call this 500G) my other hard disk as a data partition, and so i formatted it to ntfs (i just migrated then from being Windows-Ubuntu dual boot) with the label "500G"

i used the NTFS Configuration tool to automount the partition, and it's working well

it automounts on startup, able to be used by other users even while on multiple simultaneous login... and what i really like is that all files/folders that are created in that partition by any user is also available to any other users as if they were their own - can be modified, deleted, read, can create folders and files

then recently i bought another hard disk (let's call this 1.5T), but formatted it as ext4, because i want it to work in the native linux filesystem

i had this automounted by putting an entry of it in fstab:
     #Entry for /dev/sdc1:
     UUID=c5059a32-f1d3-496f-8dcd-506d45494cfd /media/1.5T ext4 defaults 0 0

i copied all the contents of 500G to the new 1.5T for backup, and re-formatted 500G to ext4 with the same label

to my dismay, it seems that i cannot write anything on the new 500G partition, and it does not automount

i did some searching and ended up putting an entry of it in fstab:
     #Entry for /dev/sda1 :
     UUID=084759c1-332b-4ef9-9038-53c3cb58d5c3 /media/500G ext4 rw,suid,dev,exec,auto,users,async 0 0

and also i did a
     sudo chmod 777 /media/500G

yes it automounted, but other users can only rename files/folders created by other users on the partition's root directory... files/folders are only readonly...

can i get help over this?

thank you in advance...

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Try:

sudo chmod -R 777 /media/500G

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#2

To get usage help on chmod command type:

man chmod

-----------------------------------

New to Ubuntu:
- read the Ubuntu Manual, it's very informative: http://ubuntu-manual.org/
Click on the "download Button" to download the latest PDF version.
- The Ubuntu pocket guide: http://www.ubuntupocketguide.com/
- The online help https://help.ubuntu.com/10.04/index.html

Relax and fun:
http://planet.ubuntu.com/ and Full Circle Magazine http://fullcirclemagazine.org/

Revision history for this message
jpgrms (jpgrms) said :
#3

i did
     sudo chmod -R 777 /media/500G

it went well with the files/directories already in it, they all bacame free for read/write/modify/delete to all other users...

but when i made another file/folder, it seems that i need to "sudo chmod -R 777 /media/500G" again for the newly created file/folder to be free to all other users also...

and it goes so also when other users are the ones creating files/directories, their files are still read-only to me and to the other users...

this is not the case when previously this partition is formatted as ntfs...

can i make this partition behave such that "all files/folders that are created in that partition by any user is also available to any other users as if they were their own - can be modified, deleted, read, can create folders and files" and doesn't need to "sudo chmod -R 777 /media/500G" each time a new file/directory is created?

thanks...

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#4

Please modify your /etc/fstab as follow:

UUID=084759c1-332b-4ef9-9038-53c3cb58d5c3 /media/500G ext4 rw,suid,dev,exec,auto,users,async,umask=000 0 0

Revision history for this message
jpgrms (jpgrms) said :
#5

thanks for answering promptly...

i did the fstab modification as suggested, but when i restarted the pc, the partition wouldn't mount...

the syslog has this entry:
     LinuxBox kernel: [ 48.624271] EXT4-fs (sda1): Unrecognized mount option "umask=000" or missing value

based here, http://ubuntuforums.org/showthread.php?t=283131, "umask" is for vfat/ntfs filesystems, am i correct?

then, i still need help...

thanks...

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

You can make the system more secure with 770 then making a new group to add the users you want access to, to the group and running:

sudo chown -R :groupname /media/500G; sudo chmod -R 770 /media/500G

The last octet is OTHERS which will give literally anyone and anybody access to the data which isn't smart, having the group gives you control.

Revision history for this message
jpgrms (jpgrms) said :
#7

@actionparsnip:

what should be the fstab entry for that partition...?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

UUID=084759c1-332b-4ef9-9038-53c3cb58d5c3 /media/500G ext4 rw,suid,dev,exec,auto,gid=groupname,async,umask=000 0 0

the group (and root) will now have the only access

Revision history for this message
jpgrms (jpgrms) said :
#9

it didn't work either

the partition still wouldn't automount at startup, can't even be mounted manually

i guess i'd have to re-format the partition to ntfs

thanks for all the help!

but if anyone would find a way, i'd still want to operate all of my partitions/harddisks in the native linux ext4 filesystem... salamat!

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

Why use NTFS?

Revision history for this message
jpgrms (jpgrms) said :
#11

it's because after putting this in the fstab entry:

     UUID=084759c1-332b-4ef9-9038-53c3cb58d5c3 /media/500G ext4 rw,suid,dev,exec,auto,gid=groupname,async,umask=000 0 0

and doing this:

     sudo chown -R :groupname /media/500G
     sudo chmod -R 770 /media/500G

the partition still wouldn't mount...

i cannot make an ext4 partition behave the way ntfs behaves in my box (with Ubuntu 10.04) - "it automounts on startup, able to be used by other users even while on multiple simultaneous login... and what i really like is that all files/folders that are created in that partition by any user is also available to any other users as if they were their own - can be modified, deleted, read, can create folders and files" (as i wrote in my question)

but again, as i said, "but if anyone would find a way, i'd still want to operate all of my partitions/harddisks in the native linux ext4 filesystem..."

thanks!

Revision history for this message
delance (olivier-delance) said :
#12

The Unix solution should be:
1) To have all users in same group
2) To have all users with a umask which allow read/write for group.
See http://en.wikipedia.org/wiki/Umask

Chmod apply only on current files, umask will apply on new files and folders.
By experience, sharing a FAT32 mounted between many users on same computer is not so easy and need, by default, to remove device before logout and inserting before login.

Can you help with this problem?

Provide an answer of your own, or ask jpgrms for more information if necessary.

To post a message you must log in.