A Netatalk Dropbox
I have netatalk on my iphone to access files via afp. I wanted a publicly accessable dropbox. These instruction deal praimarily with the iPhone, but they would work on any system where you were running netatalk.
Set you guest user account for afp shares in /etc/netatalk/netatalk.conf:
AFPD_GUEST=nobody
Turn on guest authentication in /etc/netatalk/afpd.conf by including uams_guest.so in the uams list. My line reads:
- -transall -uamlist uams_guest.so,uams_clrtxt.so,uams_dhx.so -nosavepassword
Warning: Guest can access all your shares unless you deny the user in you AppVolumes file. Though you will only have the access you guest user (nobody) has.
Setup the Public share in AppVolumes.default
I currently have 2 share in my file:
~ deny:nobody
/var/mobile/Public
I don’t want to see nobody’s home directory, so I deny the guest user from my homes (~) share. The next share is my public share. As my iPhone has only one user I use the user’s home\ directory/Public, but it could be anywhere.
Now we have to make sure the Public share is actually there and it’s permissions are set right. Every directory above must at least be executable by all as well. This should do it:
# chmod a+x /var/mobile
# mkdir /var/mobile/Public
# mkdir /var/mobile/Public/Drop\ Box
# chmod a+rx /var/mobile/Public
We want Public to be readable by everyone
# chmod a+wx,go-r,+t /var/mobile/Public/Drop\ Box/
Everyone can write to the directory, no one but the user can read from the directory, and the sticky bit makes sets permissions of uploads to match the user’s.
Restart netatalk and a new Public share should appear with a Drop Box anyone can write to.
Posted in Uncategorized
November 8th, 2008 at 6:29 am
Hey,
I’d like to get a drop box on my ipod touch but unfortunately I know pretty well nothing about code.
Where exactly am I supposed to put in these segments? I understand which files need to be altered, but after that I’m lost.
Would it be possible for you to post a copy of the finished codes so it’s possible to just cut and paste to replace the codes into their respective files?
November 10th, 2008 at 1:51 pm
I am not really sure that will help. Yes there are a couple of files to edit, and I could post them here, but you still need to be able to create directories and change permissions on directories, that would have to be done by you.
You are editing existing lines, on the first two files.
In the AppVolumes.default file you are editing the last line of the file and appending a new line below it.