Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.
This object is in archive! 

Add comment to /v/c/jailshell-additional-mounts stating that trailing slashes will render a server unusable until reboot

Guest shared this idea 11 years ago
Open Discussion

Case ID # 71613 was opened on 6/27/13 after dev discovered that trailing slashes in /var/cpanel/jailshell-additional-mounts caused the unnecessary accumulation of entries in /proc/mounts . The suggested resolution was as follows:


"Ignore trailing slashes when reading from /var/cpanel/jailshell-additional-mounts ."


As it stands from reading the case, it is undecided whether the issue of trailing slashes will be addressed in the product. The solution thus far was to add this information to our docs:


http://docs.cpanel.net/twiki/bin/vief/AllDocumentation/WHMDocs/CreateCustomMounts#Create%20custom%20mounts


"You will need to specify directories with a fully qualified (or absolute) path. Do not use a relative path. Also, do not add a trailing slash to the end of the absolute path.

  • For example, use /usr/local/foo instead of foo or /usr/local/foo/."


While it is imperative to keep our documentation updated, I feel that it would make the most sense to add a comment at the top of /var/cpanel/jailshell-additional-mounts which states this. The percentage of time that the comment will be read has to be near 100%, since it exists in the file that is being edited. The percentage of time that the docs will be reviewed will undeniably be less, for a few reasons:


1) In this case, anyone who read http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/CreateCustomMounts before it was updated would not automatically know that the docs had been updated. Thus, they may continue using the same trailing slash syntax in the jailshell-additional-mounts file across many servers (though it can be harmful on any number of servers).


2) In the case where someone reads or hears from somewhere other than cPanel about how they can just add a path to the jailshell-additional-mounts file, they may add the path, see that it simply works, and not consider the problems it may cause.


Ideally trailing slashes would be ignored. However, if that's not a possibility, then I think the next best possible thing would be to add a warning in the jailshell-additional-mounts file by way of a comment at the top, which clearly states what not to do, and why not to do it.


Thank you for your consideration of this request.

Leave a Comment
 
Attach a file