Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

What does this error mean? "mkdir: foo: Input/output error" ?

Hi,

Mac OS X 10.5.8 Leopard, kernel Darwin 9.8.0

Trying to do the following

$ cd /home
$ pwd
/home
$ ls -ld
drwxrwxrwx 4 root wheel 3 Oct 25 15:52 .
$
$ mkdir foo
mkdir: foo: Input/output error
$


$ df -k
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/disk0s2 243862672 54712084 188894588 23% /
devfs 105 105 0 100% /dev
fdesc 1 1 0 100% /dev
map -hosts 0 0 0 100% /net
map auto_home 0 0 0 100% /home
$


Can anyone tell me what's wrong that I can't create a simple file in /home?
If I do the same as sudo I get the same error.

I saw a post that seemed related but it was slightly a different problem:

http://discussions.apple.com/thread.jspa?messageID=6716555


Thanks in advance,

MacBook Pro 17", Mac OS X (10.5.8)

Posted on Nov 2, 2009 8:12 PM

Reply
6 replies

Nov 2, 2009 8:34 PM in response to rhimbo

rhimbo wrote:
Mac OS X 10.5.8 Leopard, kernel Darwin 9.8.0

Trying to do the following

$ cd /home
$ pwd
/home
$ ls -ld
drwxrwxrwx 4 root wheel 3 Oct 25 15:52 .
$
$ mkdir foo
mkdir: foo: Input/output error
$

Can anyone tell me what's wrong that I can't create a simple file in /home?
If I do the same as sudo I get the same error.


If your system is like mine, there's no "write" permissions on /home . This would prevent your mkdir command from working, even with sudo.

Try these commands:

cd /
ls -l -d home

On my system I see this:
dr-xr-xr-x 3 root wheel 2 Nov 2 09:26 home

The hyphens appear where the "w" for write permission would be.

Is there a reason you feel you need to create a file in /home?

Nov 2, 2009 8:42 PM in response to rhimbo

/home is a special automount map defined in /etc/auto_master mostly used for automounting remote home directories. you can not use it as a regular folder. if you want to do that (why?) comment out the line

/home auto_home -nobrowse,hidefromfinder

in /etc/auto_master and restart the computer.

Nov 3, 2009 8:29 AM in response to V.K.

Hi folks,

Thanks for the replies. Actually, I'm trying to create an SVN repository (NOT install the SVN commands, but create the repository only).

My "real" question is: where should I put the SVN repos?

The problem I had earlier when considering directories such as /usr/local (chosen based on info I read at pathname.org), is that those directories are not globally writable (no a+x permissions).

I can create the repo with the "svnadmin create" command, but subsequent commands such as "svn import" fail because the "user" (me) does not have write permission in the hierarchy containing the repository.

So, where should I place an SVN repo according to "correct" Unix rules?

I'm going to be accessing my repository locally only (no network access).

Thanks!

Nov 3, 2009 10:02 AM in response to rhimbo

rhimbo wrote:
My "real" question is: where should I put the SVN repos?

The problem I had earlier when considering directories such as /usr/local (chosen based on info I read at pathname.org), is that those directories are not globally writable (no a+x permissions).


"a+x" doesn't represent global writability but (for a directory) global searchability. (You'd want that attribute for all parent directories of the repository.) For global writability you'd need "a+w" as well as "a+x" and "a+r".

I can create the repo with the "svnadmin create" command, but subsequent commands such as "svn import" fail because the "user" (me) does not have write permission in the hierarchy containing the repository.

So, where should I place an SVN repo according to "correct" Unix rules?


I believe you can put the "root" of your repository in /usr/local, but you'll have to give that directory writability for all. Once that's created, try the "svnadmin create" command within that directory.

I haven't tried your specific case, but it wouldn't take long to try my advice.

Nov 3, 2009 12:53 PM in response to William-Boyd-Jr

Hi,

That was my mistake... I meant "a+wx"....

Well, I know I can change permissions on /usr/local...

What ownership/permissions should I assign to /usr/local and /usr/local/svn ? Should it be "root", "wheel", or other?

Right now I'm the only one using my Mac, but it's likely other developers will have their own accounts; how can we all access the repository?

If the repository is owned by "root", the SVN commands fail with "permission denied" because they can't write to /usr/local/svn.

So, do I reinstall the SVN commands "setuid root"?

Really I'm asking what is the "the right way" to do this in regards to Unix best practices?

Sorry, I know this has turned into a sys admin question!

Thanks again....

Nov 3, 2009 2:11 PM in response to rhimbo

rhimbo wrote:
Well, I know I can change permissions on /usr/local...

What ownership/permissions should I assign to /usr/local and /usr/local/svn ? Should it be "root", "wheel", or other?


I wouldn't change anything on /usr/local. The "o:rx" permissions on it should enable anything you want. If you apply a+rwx to /usr/local/svn, it should much matter what the ownership is.

If the repository is owned by "root", the SVN commands fail with "permission denied" because they can't write to /usr/local/svn.


Even if the directory /usr/local/svn has a+rwx permissions?

So, do I reinstall the SVN commands "setuid root"?

Really I'm asking what is the "the right way" to do this in regards to Unix best practices?

Sorry, I know this has turned into a sys admin question!


Yes, which is the reason I'm not going to try to deal with everything you're asking.

You might find more help in the discussion group area titled "Mac OS X Technologies", then the "Unix" section.

What does this error mean? "mkdir: foo: Input/output error" ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.