On 01/02/2017 03:44, Anton Aylward wrote:
Because when a processes want to open a file in /var/lib/mysql it has to traverse all the elements in the path, not just the ownership of the file in that directory. If at any stage along the line it can't read the directory or searched then you get a fail. See PATH_RESOLUTION(7). In step 2 it says <quote> Step 2: walk along the path Set the current lookup directory to the starting lookup directory. Now, for each nonfinal component of the path-name, where a component is a substring delimited by '/' characters, this component is looked up in the current lookup directory. If the process does not have search permission on the current lookup directory, an EACCES error is returned ("Permission denied"). </quote>
That's not how I thought it went ... unless I'm misunderstanding. Simply in order to access a directory, as I understand it, you need "x" permission on it - "cd dir" will succeed if you have that. If you don't know what the file you're looking for is called (that's what I understand by "search") you then need "r" on the directory. But if you know what the file is called, you don't.
Now go though the same process using the ID of the service, mysql:mysql, for each of the components of: /home/george/FaithWiringDB/dbproj/mysql and see where the a process with id=mysql, gid-mysql would hit a "Permission denied". I do NOT recommend changing all of you path to completely open permission or making it group mysql.
On each directory in that path, add permissions "other:x". Then you won't get "permission denied" (unless you accidentally deny the wrong user/group). Obviously, within the final directory, you then need more permissions to access the files you're looking for.
All in all I don't think moving the database like this is a good idea. I can understand you not wanting it to be on the ROOT partition. What I don't understnd is why you have, in that case, /var on the root partition. Regular readers will know that I use LVM to avoid the problem of allocation sizing at install time. I also make use of it for more meaningful partitioning. I have the /var on a separate partition anyway. I also have /home and /srv on separate partitions.
I have /, /var, and /home
Some of the larger things under /home/anton such as `/Photographs also have their own partition.
Running a "home server", I actually *don't* keep my photos on a separate partition. I think there are ways round it, but all our photos have their own folder - /home/pictures - and are symlinked into ~/Pictures. But the same photo may be symlinked into multiple ~s. (And they're usually owned root:root 644, so they can't be modified or deleted.)
I'd recommend having a separate /var partition very strongly. I'm sure that some very heavily trafficked sites, ISPs, even have /srv and /var on their own physical drives. In that situation the argument for have the SSD for data rather than code is much stronger.
Cheers, Wol -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org