Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Warning

I am not happy with the private share portion of this article.

Table of Contents

Introduction

I often find I need to quickly share files with the general public or selected friends. As such I have setup Online Shares with Apache. Continuing our example I will put put a public and private share on krypton as follows,

...

Assuming you are logged in as a Staff User created in the Setup Ubuntu Linux Base Server,

Shared - Public Share Folder

Code Block
languagebash
cd /home/www.krypton.com
sudo mkdir shared # Browseable folder to drop content to share with others
sudo mkdir shared.private # Browser password protected folder to drop content to share with others via .htaccess
sudo mkdir keys # Place to store keys for protected folder

cd /home

sudo chown -R serveradmin:wgkryptonian ./www.krypton.com/shared/

sudo chmod -R 775 www.krypton.com/shared/ # Only svradm and users in the kryptonian group can manage. Apache(other's) still need to be able to read and browse.

...

Code Block
languagebash
sudo /etc/init.d/apache2 reload

shared.private - Private Folders

kalel wants to have a private place to store his documents that can only be access by accounts he sets up.

...

Code Block
languagebash
cd /home/www.krypton.com/shared.private
mkdir kalel
chmod 750 kalel

cd /home/www.krypton.com/shared.private
mkdir keys
cd keys

# Create the initial password file with the first user being kalel
htpasswd -c ./kalel-www.krypton.com.shared.private kalel
New password:
Re-type new password:

# Create addition accounts. Notice NO "-c"
htpasswd .htpasswdkalel-www.krypton.com.shared.private cclark
Note

One caveat, this also prevents Apache's Index program from viewing the directory so you must know about the directory or put a link to the directory. Consider using .htaccess definition one level higher, but then it's easy to break.... hmmmm...

...

Reload the configuration file,

Code Block
langlanguagehtmlbash
sudo /etc/init.d/apache2 reload

...