7

I'm back some twenty years after my last Mac. I've got a brand new iMac running Yosemite and I do need to access an external HD formatted on (Gnu/Linux) ext4 (a journaling file system). I downloaded a library (FUSE for OSX), which is able to read that file system and a complementary app (ext4fuse), which works as a client interface to FUSE. I can mount the disk and navigate it on the finder or on a terminal but, when it comes to actually copying files (either on a terminal [see * below, pls] or on the finder), I get an error such as "Cannot read the file" or even "File does not exist". I suspect that it has something to do with permissions, so I thought that doing the copying as root might help.

I'd appreciate any help. Thanks in advance!

Nacho

P.S. I've tried any number of searches to no avail. [*] Trying to do the job from the terminal issuing a cp command didn't get my any closer to achieve it. Apparently, btw, the cp command in OSX is kinda restricted (regarding to its available options and functionality) wrt its Linux counterpart and, to add the insult to the injury, its options don't work the same (see -R, for instance).

closed as too broad by bmike Jan 8 '15 at 16:22

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • sudo /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder has always worked for me, and I use Dropbox too (and I don't need to stop any daemons). It's probably an issue with your installation of Dropbox or some other third-party app. – interestinglythere Dec 7 '14 at 22:54
  • sudo /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder may be it will help – Rajdeep Dec 7 '14 at 23:31
  • Is this something you still wish to accomplish? If so, we would need you to update the question with some details. diskutil list and parts of ls -l@ /Volumes/* and perhaps xattr on one or two files that give you the "File does not exist" error. Running as root isn't enough to read all files so that's probably a red herring here. – bmike Jan 8 '15 at 16:22
  • 1
    What I wanted to do was copying a (huge) number of files from a disk formatted as ext4 to another disk (either FATxx or to HFS+ were ok for me). And I said wanted because I worked around the problem by doing it from my old GNU/Linux machine. More generally, the problem was being able to read an alien (journaled) FS such as ext4, jfs or reiserfs for instance and, ideally, without loss of metadata (part of them, at least, such as permissions, creation/update times or owner). – nmizar Jan 9 '15 at 21:34
  • Just a note, the sudo approach to running Finder is no longer working for me on macOS High Sierra… It runs but doesn't open any windows. – w00t Nov 13 '17 at 12:42
7

I fully accept the warnings other people have given here regarding running finder as root... but in a limited scenario it is very useful.

The OP had a problem using the:

sudo /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder

I suspect he/she may have also been using something like TotalFinder or XtraFinder

If so, then use the options in the custom menu for these add-ons to restart Finder.

Alternatively:

  1. Run the command above (sudo Finder) in terminal
  2. You will notice the hard drive icon overlayed on your desktop for root... but it is probably not clickable (hence the error message)
  3. Then open a new tab in Terminal (so the sudo tab is still running) and kill the standard Finder (without using Sudo) "killall Finder"
  4. You should now be able to double click on the overlayed HardDrive desktop icon, or...
  5. In the same non-Sudo tab of Terminal, just type "open ."

One other point to note... if you're wanting to browse as root, you probably also want to see hidden files. So before starting all this, type the command below into Terminal. This is a permanent setting, so you only need to do it once for the root user.

sudo defaults write com.apple.finder AppleShowAllFiles TRUE

  • Good info on trying to take the OP to the next step. Let's see if we can get a specific error on a specific file to see if it's a traditional permissions issue or if this is really about other filesystem attributes or errors... – bmike Jan 8 '15 at 16:22
  • @bmike, as I said above, the problem was accessing (a huge number of) files on an alien fs format (ext4, in this case) and moving them to a format that OSX could be able to understand. Nevertheless, despite the workaround (starting up an old Ubuntu box and copying the whole lot to another disk this one formatted on EXT32), I think it is still an interesting (though somewhat general) problem. – nmizar Jan 9 '15 at 21:40
  • Thanks, @Nic. I cannot get back to the old situation motivating the question (see above). In fact, I re-formatted the old ext4 fs disk to use it with TimeMachine. Nevertheless, a few clarifications: I wasn't using Total or Xtra finders. I didn't know about them, thanks ;-) Then, I tried your solution and, to the extent that I could follow it, it worked. I didn't even need to issue the open command, because the disk was already there to click it open. In fact, it looks like not every Finder was killed, as there were two icons for each of my external disks. BTW, I'm a he (see pic) :-P – nmizar Jan 9 '15 at 21:51
2

Don't go there!

Neither Finder nor any other app with a GUI should be run as root. GUI applications are hard to debug and generally have ill-defined scope and purpose. They're china shops that you shouldn't let your 800-pound gorilla superuser enter.

Especially since you give as your reason: "I suspect that it has something to do with permissions, so I thought that doing the copying as root might help."

Find out what permissions problems you have. If you even have any.

If you must do something as root, use the sudo command to run a narrowly focused tool to do exactly what you need done, and no more.

Indiscriminate use of root privileges is more likely to cause permissions problems than to solve them. Be sure you know what you're doing, and why before doing so.

  • 2
    With big power, comes big responsibility ;-) Your warning is actually a good one for any newbie but I've been using GNU/Linux boxes, where you routinely sudo (exec as root) or browse as root to do some (many) admin tasks for many years now. I'm getting used to OSX (where many of this tasks look to be hidden or unnecessary) but I still reckon that, as @Nic said below, there are times when you need to do things that require the extra set of privileges. In my case, it looked like I needed to be root to get the job done (but for my workaround, see above). – nmizar Jan 9 '15 at 22:05

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