Сегодня в статье настроим и русифицируем Ubuntu Server 16.04/18.04/20.04. Чтобы поддерживался русский язык, и перевод системы стал русским
В этой статье рассмотрим пример обновления Ubuntu Server 16.04 до Ubuntu Server 18.04 Все наши действия нам придется выполнять из Читать
В этой статье рассмотрим пример как можно переименовать сетевые интерфейсы в дистрибутивах Linux. После обновления systemd (частью которого является udev) Читать
Сегодня поговорим об ошибке ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ выдаваемой при попытке подключится к MYSQL ERROR 1045 Читать
sudo -i solved this issue for me, on ubuntu with a directory i ran the following on sudo chown -R mysql:mysql .
mysql user is the only one that can access to the directory, you can use root to access there and change permissions, or you can change the directory permissions to 740 with
permissions are divided in 3 parts user/group/else. and you have
so the «owner» has read(4) + write(2) + execute(1) = 7 permissions in that directory
You should use 750 or 755 if you want others to access the directory. 740 is sufficient for members of the right group to read the immediate directory listing and nothing more. The execute bit is more important here.
mysql group has no access to that directory. The rights for the mysql user are rwx , but group and others get — , so being in the mysql group doesn’t give you what you want.
I see, so to cd into it I need either to add the mysql group, or sudo -i and to then cd mysql. Do you think it’s a bad idea the former solution regarding security?
It may be a bad idea from the point of view of packaging — when you upgrade mysql it could reinstall the old privileges on /var/lib/mysql.
The mysql group doesn’t have permissions on the directory, only the mysql user.
From given inputs it is clear that only owner mysql has read, write, execute permission on /var/lib/mysql directory.
And current login user — ravas is part of mysql group. Hence ravas user can cd to /var/lib/mysql directory if group mysql has x (ie execute) permission on /var/lib/mysql .
Hence chmod g+rx /var/lib/mysql OR chmod 750 /var/lib/mysql would allow ravas user to cd to /var/lib/mysql and read directory contents (ie. list files)
Each file and directory has three user based permission groups:
owner — The Owner permissions apply only the owner of the file or directory, they will not impact the actions of other users.
group — The Group permissions apply only to the group that has been assigned to the file or directory, they will not effect the actions of other users.
all users — The All Users permissions apply to all other users on the system, this is the permission group that you want to watch the most.
drwx—— 13 mysql mysql 4096 Feb 10 22:32 mysql
the above show mysql folder Permissions is 700, So mysql user have all read,write and execute permission. mysql group have none permission. although, ravas user belong mysql group. haven’t permission.
Adblock