0

Can I put my folders outside the user folder (e.g. on the root of Mac HD), such as personal folder or work folder, where I have many files? The reason I want to do it is that OS X may have performance issues where one folder has too many files (reference), and as a recent Windows switcher, this is more like the partition/disk letter approach to file organizing. I'm the only user of my macbook so there's no privacy issues. When I first copied the files to the root, the os asks for admin password. Will I have issues with permissions if I do that? And in general, what's the potential cons with this and what's special about the home folder?

  • 4
    'too many files' isn't in the order of a few thousand, or even a few million - it's 2 billion. My Home folder contains a mere 350,000. My largest folder out of 10TB of storage is still only 1.5 million. I think you're looking for a problem that doesn't exist. – Tetsujin Aug 8 '15 at 9:09
  • 1
    Make subdirectories in your home directory - it will have exactly the same speed as directories in the root - why do you think there is a difference – user151019 Aug 8 '15 at 9:18
  • 2
    It is fully relevant for any location of a directory (/ or /home) and for a lot of systems (Linux, MacOS X…). This is a human managment risk. How do you imagine the owner of such a directory will detect a missing file? How do you imagine a GUI (Finder) will perform on updating the images or icons associated with such a directory content? – dan Aug 8 '15 at 9:45
  • 1
    Time Machine itself, Apple's own backup medium, is quite likely to have factors more files than any other folder on your drive. I wouldn't let it worry you. Purely anecdotally, I've lost far more NTFS drives in the past 5 years [approximately 10] compared to HFS+ drives I've lost [exactly none] (All data was backed up & no actual loss was incurred) – Tetsujin Aug 8 '15 at 9:46
  • 1
    A closer approximation to an actual answer to your question would be - You can put the folders anywhere you like. Initial creation/deletion at root of the boot drive will require admin authentication. Dealing afterwards with anything inside that hierarchy then will be seamless. Permissions will not be automatically tested outside your home structure, so you may need to chown/chmod on occasion if anything goes awry. – Tetsujin Aug 8 '15 at 9:50
1

If you create (or rename) a folder at the root, OS X will ask for your password. This is because you do not own the root folder. Once the folder exists, you can copy (or add) as many files and folders to it without having to enter a password. In terms of permissions, the only difference, between such a folder and your home folder, is the home folder has an Access Control List (ACL). Entering the command ls -led ~ in a terminal window results in listing the home folder's permissions. On my computer running OS X 10.10.4, I get the following output.

Davids-iMac:/ davidanderson$ ls -lde ~
drwxr-xr-x+ 20 davidanderson  staff  680 Aug  6 21:51 /Users/davidanderson
 0: group:everyone deny delete

The ACL is group:everyone deny delete. I assume denying everyone delete permission prevents the deletion of your home folder.

One small point, normally your files are assigned to the group named staff. If you create a folder in the root folder, the group will be wheel instead of staff. You can correct this by typing the command chgrp staff /newfolder after creating the folder. Substitute your folder name for newfolder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .