Still weird.
Try:
sudo -i
umask
Try:
sudo -i
umask
root@vinny-Bonobo-Extreme:~# umask 0022
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 1953525167 976762583+ ee GPT Partition 1 does not start on physical sector boundary. root@vinny-Bonobo-Extreme:~#
Model: ATA HGST HTS721010A9 (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Number Start End Size File system Name Flags 1 1049kB 1000GB 1000GB btrfs primary
cd /mnt/btrfs sudo chmod go-w . cd .. ls -l
lee@lee-H67N-USB3-B3:~$ sudo mount /dev/sdb1 /mnt [sudo] password for lee: lee@lee-H67N-USB3-B3:~$ sudo btrfs subvolume create /mnt/@data Create subvolume '/mnt/@data' lee@lee-H67N-USB3-B3:~$ ls -l /mnt total 0 drwxr-xr-x 1 root root 0 Feb 1 10:49 @data lee@lee-H67N-USB3-B3:~$ ls -l total 0 drwxrwxr-x 1 lee lee 264 Nov 30 20:00 bin drwxrwxr-x 1 lee lee 0 Jan 29 21:33 data lee@lee-H67N-USB3-B3:~$ sudo chmod o-rx /mnt/@data lee@lee-H67N-USB3-B3:~$ sudo chown lee:lee /mnt/@data lee@lee-H67N-USB3-B3:~$ sudo umount /mnt lee@lee-H67N-USB3-B3:~$ sudo mount /dev/sdb1 -o rw,relatime,space_cache,subvol=@data /home/lee/data [B]I made some test folders and they have right permissions.[/B] lee@lee-H67N-USB3-B3:~$ ls -l ~/data total 0 drwxrwxr-x 1 lee lee 244 Feb 1 10:58 test2 drwxrwxr-x 1 lee lee 0 Feb 1 10:58 test folder [B]Now I edid /etc/fstab and add the line below and reboot.[/B] UUID=3dddb32d-50ad-4ed1-bdc2-b1fd9ec6f47f /home/lee/data btrfs rw,relatime,space_cache,subvol=@data 0 0 [B]After reboot and adding another test folder all looks well.[/B] lee@lee-H67N-USB3-B3:~$ cd ~/data lee@lee-H67N-USB3-B3:~/data$ ll total 0 drwxr-x--- 1 lee lee 52 Feb 1 11:18 ./ drwxr-xr-x 1 lee lee 616 Feb 1 11:18 ../ drwxrwxr-x 1 lee lee 0 Feb 1 11:18 New Folder/ drwxrwxr-x 1 lee lee 244 Feb 1 10:58 test2/ drwxrwxr-x 1 lee lee 0 Feb 1 10:58 test folder/
lee@lee-H67N-USB3-B3:~$ ls -l /mnt total 0 lee@lee-H67N-USB3-B3:~$
lee@lee-H67N-USB3-B3:~$ ls -l ~/ total 0 drwxrwxr-x 1 lee lee 264 Nov 30 20:00 bin drwxr-x--- 1 lee lee 52 Feb 1 11:18 data drwxr-xr-x 1 lee lee 110 Feb 1 11:35 Desktop drwxr-xr-x 1 lee lee 1694 Jan 28 19:18 Documents drwxr-xr-x 1 lee lee 1390 Jan 29 20:34 Downloads drwxr-xr-x 1 lee lee 0 Jan 28 18:24 Music drwxrwxr-x 1 lee lee 446 Jan 29 21:12 Pictures drwxr-xr-x 1 lee lee 0 Jan 28 18:24 Public drwx------ 1 lee lee 38 Jan 29 20:33 SpiderOak Hive drwxr-xr-x 1 lee lee 0 Jan 28 18:24 Templates drwxr-xr-x 1 lee lee 0 Jan 28 18:24 Videos lee@lee-H67N-USB3-B3:~$
lee@lee-H67N-USB3-B3:~$ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda3 during installation UUID=168c70e2-2da1-4c80-a013-4dfb0396811f / btrfs defaults,subvol=@ 0 1 # /home was on /dev/sda3 during installation UUID=168c70e2-2da1-4c80-a013-4dfb0396811f /home btrfs defaults,subvol=@home 0 2 UUID=3dddb32d-50ad-4ed1-bdc2-b1fd9ec6f47f /home/lee/data btrfs rw,relatime,space_cache,subvol=@data 0 0 # swap was on /dev/sdb5 during installation UUID=a6681407-f973-425f-a35a-3effdac732c9 none swap sw 0 0 tmpfs /tmp tmpfs nodev,nosuid 0 0 lee@lee-H67N-USB3-B3:~$
lee@lee-H67N-USB3-B3:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 78G 34G 44G 44% / none 4.0K 0 4.0K 0% /sys/fs/cgroup udev 3.9G 4.0K 3.9G 1% /dev tmpfs 3.9G 264K 3.9G 1% /tmp tmpfs 797M 1.1M 796M 1% /run none 5.0M 4.0K 5.0M 1% /run/lock none 3.9G 14M 3.9G 1% /run/shm none 100M 24K 100M 1% /run/user /dev/sda3 78G 34G 44G 44% /home /dev/sdb1 225G 653M 223G 1% /home/lee/data /dev/sda2 147G 127G 20G 87% /media/lee/MLion lee@lee-H67N-USB3-B3:~$
Comment