D
D
dozagufazu2017-02-14 22:48:19
linux
dozagufazu, 2017-02-14 22:48:19

After formatting to ext4, I can’t write to USB - how to return the rights?

Stupid question. But I can't find the decoding for this spell . sudo chown -R $USER:$USER <Mount Point>
Ok, <Mount Point>this is mine /dev/sdb. But what the hell is $USER:$USER? I tried to enter without changes $USER:$USER, I tried my account name, I tried 2 times through: - writing to a USB flash drive still does not work.
Formatted by the commandmkfs.ext4 /dev/sdb

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Moseychuk, 2017-02-14
@dozagufazu

Ок, <Mount Point> это моя /dev/sdb
Wrong. This is a mount point, not a block device.
It is more correct to write $USER:$GROUP
This is the name of your user and group (usually their names are the same),
My command will look like this: sudo chown -R fshp:fshp /run/media/fshp/myflash
/run/media/fshp/myflash is the mount point of my flash drive. You can create an empty directory anywhere and mount a filesystem from a block device there.

mkdir ~/myflash
sudo mount /dev/sdb ~/myflash

Now in the home directory there is a directory myflash, which contains the contents of the flash drive.
If you mount the FS in a non-empty directory, then the files will not disappear from the directory, but will be inaccessible while the FS is mounted.
If you're using the DE, then manual mounts are usually not needed. When connected, the flash drive will be mounted automatically.
Before disconnecting the flash drive, you must unmount the file system
. Or click "extract" or an analogue in DE (in case of automatic mounting).

D
Dmitry, 2017-02-14
@Tabletko

Wrong. Mount point is the mount point (where the device is mounted) and /dev/sdb is the block device. Replace $user with your username. At least occasionally read man.

X
xtala zen, 2017-02-14
@xtala

User user. This is the name of the current user and the group to which he belongs emnip. Those. the username under which you log in. In ubuntu, rights change without any consoles. Run nautilus as root sudo nautilus right click on the folder or object of interest and change as you wish. Just keep in mind that the current user in nautilus from under root will be root, and not your local user. Those. if you want to give rights to your loved one, look for the name of your user in the drop-down list, and do not leave "current user".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question