{"action":"closed","issue":{"url":"https://api.github.com/repos/colinmollenhour/modman/issues/111","repository_url":"https://api.github.com/repos/colinmollenhour/modman","labels_url":"https://api.github.com/repos/colinmollenhour/modman/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/colinmollenhour/modman/issues/111/comments","events_url":"https://api.github.com/repos/colinmollenhour/modman/issues/111/events","html_url":"https://github.com/colinmollenhour/modman/issues/111","id":147826910,"number":111,"title":"Hard link as an alternate to symlink/copy","user":{"login":"gamort","id":15091656,"avatar_url":"https://avatars.githubusercontent.com/u/15091656?v=3","gravatar_id":"","url":"https://api.github.com/users/gamort","html_url":"https://github.com/gamort","followers_url":"https://api.github.com/users/gamort/followers","following_url":"https://api.github.com/users/gamort/following{/other_user}","gists_url":"https://api.github.com/users/gamort/gists{/gist_id}","starred_url":"https://api.github.com/users/gamort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gamort/subscriptions","organizations_url":"https://api.github.com/users/gamort/orgs","repos_url":"https://api.github.com/users/gamort/repos","events_url":"https://api.github.com/users/gamort/events{/privacy}","received_events_url":"https://api.github.com/users/gamort/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-12T17:54:26Z","updated_at":"2016-04-13T20:17:24Z","closed_at":"2016-04-13T20:17:24Z","body":"Overall, modman is a nice structure for deploying components.\r\n\r\nI personally do not like allowing symlink - their a security risk*1\r\n\r\nCopy is rather limited in that it cannot handle maintenance.\r\n\r\nHard links were pretty much designed for this situation.   So I'm somewhat curious on why symlinks ended up being used quite so much instead of using hard links?  Was this a deliberate decision?\r\n\r\n*1:  If you assume that the web server is going to be allowed to follow symlinks, then there is no issue.  However, since the default behaviour is not to follow symlinks - it can be highly convenient to use symlinks to segregate data.   For example, when trying to break people of the habit of making an sql data dumb or a tar archive all files inside the html folder  - I generally \r\n-- create a couple subdirectories, [backuppath]/data/badhabits and [backuppath]/data/badhabitsdiehard\r\n-- symlink the badhabits subdirectory to [webroot]/backups and whatever directories I find they have been using inside the webrootare deleted and symlinked to [backuppath]/data/badhabitsdiehard\r\n-- make sure  Options -FollowSymLinks is in the htaccess file for the root directory\r\n-- instruct them to use the [backuppath]/data folder\r\n\r\nMost of the time,  the lecture doesn't do any good and data dumps and backup files continue to be stuck inside the webroot.  However:\r\n-- Since the directory is not really there, the files cannot be accessed/downloaded by a web browser\r\n-- For my own amusement, I can see how many dumps are being placed by habit[they end up in badhabitsdiehard] and how many due to ignorance[they end up in badhabits]\r\n\r\nIt wasn't until I ran across my first site using modman that this simple security mechanism broke the site. \r\n\r\nAnd no, I do not feel \"just don't save sensitive data to the webroot\" is an acceptable answer.   That answer is acceptable only if you are in complete charge of the system and thus are the only one[or company] that is able to create these files.   In the real world, where the client pays for hosting and has full write access - it is sheer laziness not to take an extra 10 minutes to try to keep them from exposing sensitive data.\r\n\r\n"}}