Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Solved] Mount permissions HDD
Re: Mount permissions HDD
0k, thanks. I used the guide on https://ubuntuforums.org/showthread.php?t=1604251 Maybe it had not been the best way to do it.
Re: Mount permissions HDD
To say the least, following advice from 2010 of a different distro than Debian isn't likely to be the best way to proceed.Lamios wrote:0k, thanks. I used the guide on https://ubuntuforums.org/showthread.php?t=1604251 Maybe it had not been the best way to do it.
Tell bw123 what you have entered for uid and gid, there is no reason for you to keep that information secret, especially if you want help fixing the problem. bw123 is trying to help you and the rest of us watching would warn you if you didn't get good advice.
At the same time, open a terminal and enter
Code: Select all
id
- sunrat
- Administrator
- Posts: 6412
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 116 times
- Been thanked: 462 times
Re: Mount permissions HDD
I'll show you mine. I have an external drive where I back up and sync between 2 computers and use ntfs as it needs to be accessible in Windows too.
uid and gid is needed to keep consistency with sync. You can use name or numerical id, curiously mine is
so I just put name. You don't need umask and don't need rw or noatime or noauto (or auto) if you just use defaults.
Try
"Removing the search bits" is what the umask does. It's called "execute" bit and you can't enter a directory without it.
Code: Select all
LABEL=green-media /mnt/green-media auto noauto,user,uid=roger,gid=roger,rw,noatime 0 0
Code: Select all
$ id roger
uid=1000(roger) gid=1004(roger)
Try
Code: Select all
UUID=0BE7094A0BE7094A /media/Volume ntfs-3g defaults,uid=<whatever>,gid=<whatever> 0 0
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Re: Mount permissions HDD
Yes, it had not been the best idea to follow and outdated tutorial from another distro
Sorry for not having shared this content in before. I thought it is better not to make things public, when I am not sure if one should make it public
Here is the line I wrote at the end of /etc/fstab
and this is the output from id
So I basically just have to delete umask? And follow the code from sunrat.
Thanks for your help!
Sorry for not having shared this content in before. I thought it is better not to make things public, when I am not sure if one should make it public
Here is the line I wrote at the end of /etc/fstab
Code: Select all
UUID=0BE7094A0BE7094A /media/Volume ntfs-3g defaults,auto,uid=1000,gid=1000,umask=023 0 0
Code: Select all
uid=1000(Lamios) gid=1000(Lamios) groups=1000(Lamios),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),114(bluetooth),115(lpadmin),119(scanner)
Thanks for your help!
Re: Mount permissions HDD
I deleted the umask part and now everything works again
Can I let auto where it is? I think it is for automatic mount during booting?
Can I let auto where it is? I think it is for automatic mount during booting?
-
- Posts: 1394
- Joined: 2007-03-04 21:10
- Location: U.S.A. - WI.
Re: Mount permissions HDD
You can mask the NTFS ACL permissions with Linux / POSIX permissions:
You need dmask and fmask, not umask.
Good place to find most config options[1] for nearly anything is the arch wiki. You may have to dig around for slight variations with where Debian stores config files ETC., but the actual configuration is usually the exact same. Gentoo wiki is also, or at least was also, a good place to look for config options.
[1] As always, use common sense when looking for config options. ARCH names may not align 100% with Debian naming conventions. You can't install ARCH packages directly on Debian without recompiling and Debianizing the sources, etc. etc. etc.
EDIT: also read the next few lines down from this on https://wiki.archlinux.org/index.php/NTFS-3G to see how you can set up mounting under one user and allowing all users of a specific group access too.
Code: Select all
Linux compatible permissions
Permissions on a Linux system are normally set to 755 for folders and 644 for files. It is recommended to keep these permissions in use for the NTFS partition as well if you use the partition on a regular basis. The following example assigns the above permissions to a normal user:
# Mount internal Windows partition with linux compatible permissions, i.e. 755 for directories (dmask=022) and 644 for files (fmask=133)
/dev/NTFS-partition(or UUID=....) /mnt/windows ntfs-3g uid=username,gid=users,dmask=022,fmask=133 0 0
You need dmask and fmask, not umask.
Good place to find most config options[1] for nearly anything is the arch wiki. You may have to dig around for slight variations with where Debian stores config files ETC., but the actual configuration is usually the exact same. Gentoo wiki is also, or at least was also, a good place to look for config options.
[1] As always, use common sense when looking for config options. ARCH names may not align 100% with Debian naming conventions. You can't install ARCH packages directly on Debian without recompiling and Debianizing the sources, etc. etc. etc.
EDIT: also read the next few lines down from this on https://wiki.archlinux.org/index.php/NTFS-3G to see how you can set up mounting under one user and allowing all users of a specific group access too.
fortune -o
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Re: Mount permissions HDD
From the manual page for fstab
When you have a question, it is always a good idea to refer to the man page.
So, that "auto" is redundant but it won't stop it from working.defaults
use default options: rw, suid, dev, exec, auto, nouser, and async.
When you have a question, it is always a good idea to refer to the man page.
Re: Mount permissions HDD
Thank you for all these helpful informations!
I altered the line to the following:
Now it is not possible, to write to the HDD anymore. What did I do wrong?
I altered the line to the following:
Code: Select all
UUID=0BE7094A0BE7094A /media/Volume ntfs-3g defaults,uid=1000,gid=1000,dmask=022,fmask=133 0 0
Re: Mount permissions HDD
Sometimes it is easier to understand the effect of an fstab entry (or mount command) by looking at the output of the mount command and see what the options look like.I altered the line...[in fstab]...
...Now it is not possible, to write to the HDD anymore. What did I do wrong?
Code: Select all
man mount
man grep
mount | grep Volume
Experimenting is good, but do it on a "safe" or test partition/data/fs first. Debian seems to have really good defaults for a lot of things. Permissions and ownership are things you can spend years figuring out. There's really no need to make things complicated.
When you get old and your memory start to fail, you won't remember these complicated setups you did when you were young. If you do make changes, put notes to yourself in the files you change, like fstab. Drop a little README into a directory, or a link to a place you keep notes for yourself.
resigned by AI ChatGPT
Re: Mount permissions HDD
mount | grep Volume gives the following:
I already started to make nodes
Code: Select all
/dev/sda1 on /media/Volume type fuseblk (ro,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
-
- Posts: 1394
- Joined: 2007-03-04 21:10
- Location: U.S.A. - WI.
Re: Mount permissions HDD
Lamios wrote:mount | grep Volume gives the following:I already started to make nodesCode: Select all
/dev/sda1 on /media/Volume type fuseblk (ro,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
That says the owner and group for that mount is root: user_id=0.
It also says it is mounted read only: ro.
Also, where in the Arch wiki did it say to include "defaults", or use UID / GID numbers ( even though they SHOULD be interchangeable )? I haven't played with ntfs-3g in forever so I can't say for sure that using a UID number in fstab is OK or not ( although I think this would break POSIX compliance if you can't ).
You MUST follow instructions fully in Linux, and remember that everything is also CaSeSeNsiTive.
Try writing and re-mounting the drive with the options given, and then we can go from there. Remember to replace "username" with the name of your user. And as a bonus hint the name of the default group in Debian is also your username - hence why your groupname / username both resolve to 1000.
fortune -o
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Re: Mount permissions HDD
ok, you're obviously being difficult. The option default_permissions is likely from some type of user mapping you have neglected to mention. I'm not going to waste any more time with someone intentionally trying to infest the forum with misinformation and confusing information.Lamios wrote:mount | grep Volume gives the following:I already started to make nodesCode: Select all
/dev/sda1 on /media/Volume type fuseblk (ro,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
ntfs on debian is super-easy and does not require any complicated setup. The defaults for both mount command and fstab entry result in a mount that looks like the one I posted before. The defaults allow access to everything by everybody.
resigned by AI ChatGPT
Re: Mount permissions HDD
Sorry, I did not intend to
I also don't know about any user mapping.
and I am sorry, if something may have been mistakable.infest the forum with misinformation and confusing information
I also don't know about any user mapping.
- sunrat
- Administrator
- Posts: 6412
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 116 times
- Been thanked: 462 times
Re: Mount permissions HDD
[quote="Lamios"]mount | grep Volume gives the following:
That appears to be the default, same as mine. Check the permissions of the files, should be owned by your user if fstab entry is correct.
Code: Select all
/dev/sda1 on /media/Volume type fuseblk (ro,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Re: Mount permissions HDD
I checked the permissions an I am the owner of the files, together with my group.
According to the properties entry, I should have rw permissions, the owning group and others only r permissions. Also if the entry states I have write permissions, I am nevertheless not able to write to the HDD.
I also tried to get some working code with the Arch Wiki, but it did not work out until yet.
This is the actual piece I am using, with my id changed to my username, as it had been suggested.
According to the properties entry, I should have rw permissions, the owning group and others only r permissions. Also if the entry states I have write permissions, I am nevertheless not able to write to the HDD.
I also tried to get some working code with the Arch Wiki, but it did not work out until yet.
This is the actual piece I am using, with my id changed to my username, as it had been suggested.
Code: Select all
UUID=0BE7094A0BE7094A /media/Volume ntfs-3g defaults,uid=lamios,gid=lamios,dmask=022,fmask=133 0 0
- sunrat
- Administrator
- Posts: 6412
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 116 times
- Been thanked: 462 times
Re: Mount permissions HDD
You said it worked without masks. You have to work out if you need masks (I don't use them) and what effect they have if you do.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
-
- Posts: 1394
- Joined: 2007-03-04 21:10
- Location: U.S.A. - WI.
Re: Mount permissions HDD
My bet is there was an unclean umount while working on getting everything. If I remember correctly ntfs-3g will only mount NTFS partitions that are flagged dirty as RO.
Easiest way to check this is to manually umount and remount the partition and see if it either spits out an error to console or in dmesg.
Easiest way to check this is to manually umount and remount the partition and see if it either spits out an error to console or in dmesg.
fortune -o
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Re: Mount permissions HDD
Deleting the masks does not really solve the problem (also if it worked before I used the dmask and fmask). But it is now possible to open the 'create new' entry, but not to write it. That had not been possible in before. Trying to create a folder as root states that it is an read-only file system. Due to deleting the masks, everyone now has read, write and execute permissions.
An unclean unmount could be possible. I did try the un- and remounting twice. The first time it had been possible and in dmesg I could not find any warnings or errors.The second time it gave me the following: I remember to have had this error in before, but thought it is unimportant because it is only due to some open processes in the background and will solve out after a reboot.
dmesg did not give me the complete output (I think it had been to long and therefore shortened in the beginning?) I only could find an firewall error, which occured after the failed unmount: But I think this is maybe not related to the HDD mount (and another topic if it reoccurs)...
An unclean unmount could be possible. I did try the un- and remounting twice. The first time it had been possible and in dmesg I could not find any warnings or errors.The second time it gave me the following:
Code: Select all
The device is currently busy: Error unmounting /dev/sda1: Command-line `umount "/dev/sda1"' exited with non-zero exit status 32: umount: /media/Volume: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
dmesg did not give me the complete output (I think it had been to long and therefore shortened in the beginning?) I only could find an firewall error, which occured after the failed unmount:
Code: Select all
[ 2038.688746] nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers instead.
-
- Posts: 1394
- Joined: 2007-03-04 21:10
- Location: U.S.A. - WI.
Re: Mount permissions HDD
You can try running
where you replace XX with the disk and partition number E.G. /dev/sda1 - you will have to figure out which partition is the NTFS filesystem.
You will also have to make sure fastboot is disabled in Windows and that Windows does not have a hibernation file present on that partition if you use it as a Windows boot device.
Code: Select all
ntfsfix /dev/sdXX
You will also have to make sure fastboot is disabled in Windows and that Windows does not have a hibernation file present on that partition if you use it as a Windows boot device.
fortune -o
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Re: Mount permissions HDD
It had been the fastboot from Windows, which caused the problems! Even though Windows runs on a separated disk. I am sure I deactivated fastboot before I installed Debian. Anyway... Thank you for your help!