You can leave your $HOME dir ownership alone. You don't need to set it to www-data. What you do have to do is ensure that Apache has execute permissions on $HOME and everything above it. So, you could do something like this:
chmod 751 "$HOME"
sudo chmod 751 /home
However, the fact that $HOME is encrypted might pose major problems for Apache unless you can somehow configure Apache to use the proper decryption key.
EDIT:
Setting execute permissions on a directory means only that you can access something inside the directory if you already know its name and if what you're trying to access also has correct permissions. So setting a global x-bit on $HOME isn't too much of a security risk, as long as all your other files have reasonable permissions. You might want to look into your umask to be sure.
I've had some issues with rsync/ssh and cygwin, this is how I managed to solve:
- Disable acl's as these cannot be properly mapped to Linux ACL's
- Check mount options before changing:
$ mount
D:/ProgramsVista/ICW/etc/terminfo on /usr/share/terminfo type ntfs (binary,noacl)
D:/ProgramsVista/ICW/bin on /usr/bin type ntfs (binary,noacl)
D:/ProgramsVista/ICW/lib on /usr/lib type ntfs (binary,auto)
D:/ProgramsVista/ICW on / type ntfs (binary,noacl)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)
E: on /cygdrive/e type iso9660 (binary,posix=0,user,noumount,auto)
cp /etc/fstab /etc/fstab.install
echo "none /cygdrive cygdrive binary,posix=0,user,noacl 0 0" >> /etc/fstab
- To activate the new setting, logout and login again
logout
ssh Adminstrator@hostname
- Check the new setting for "noacl":
$ mount
D:/ProgramsVista/ICW/etc/terminfo on /usr/share/terminfo type ntfs (binary,noacl)
D:/ProgramsVista/ICW/bin on /usr/bin type ntfs (binary,noacl)
D:/ProgramsVista/ICW/lib on /usr/lib type ntfs (binary,auto)
D:/ProgramsVista/ICW on / type ntfs (binary,noacl)
C: on /cygdrive/c type ntfs (binary,noacl,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,noacl,posix=0,user,noumount,auto)
E: on /cygdrive/e type iso9660 (binary,noacl,posix=0,user,noumount,auto)
(sorry can't seem to get the formatting right this morning.)
Best Answer
You can:
Detailed Step-by-Step Guide
Assume you're becko and you want to move the files to bob's home directory. Thus the paths for your homes are as follows (by default):
Now let's say the paths of the files you want to move are as follows:
Now, with this introduction, we can start.
NOTE: This example assumes all relevant files are one level below your home directory.
Step One: Make your home directory world-readable and writeable
While logged in as yourself, open a terminal
(Ctrl+Alt+T)
.Go to your home directory and make it world-readable:
Step Two: Login into his Account
Then, using the example provided above:
You'll be prompted with his password.
Step Three: Move your files to his directory
After you login, you should see the following prompt (or something close to it):
Now you are in bob's home directory. Now, time to move your stuff over.
The following commands should do it:
Step Four: Change Ownership of Files:
NOTE: For me, the ownership changed to bob automatically, but might as well be safe than sorry. :)
Commands:
Step Five: Logout of His Account
This one's easy. Type:
Your prompt should then change back to something like:
Step Six: Revert your home directory permissions.
By default, the permissions are 0755. So, we'll do that:
Close the terminal and you're done!