General :: Testing Home Directory Scripts By Setting $HOME To The Location Of The Test Directory
Apr 20, 2010
I have an interdependent collection of scripts in my ~/bin directory as well as a developed ~/.vim directory and some other libraries and such in other subdirectories. I've been versioning all of this using git, and have realized that it would be potentially very easy and useful to do development and testing of new and existing scripts, vim plugins, etc. using a cloned repo, and then pull the working code into my actual home directory with a merge.
The easiest way to do this would seem to be to just change & export $HOME, eg
cd ~/testing; git clone ~ home
screen -S testing-home
# start vim, write/revise plugins, edit scripts, etc.
# test revisions
However since I've never tried this before I'm concerned that some programs, environment variables, etc., may end up using my actual home directory instead of the exported one. Is this a viable strategy? Are there just a few outliers that I should be careful about?
I have to zip de home directory to a location but i can't seem to get it done.
I have succeeded to zip a folder within the home folder (Music folder) but when i try to zip the entire home folder i get an error. I have tried different ways but no success so far.
This is what i tried so far:
1) tar cf backup_homedir.tgz ../
2) tar cf backup_homedir.tgz /home/indur
Error message: ( i hope i translate it well because my language isn't english, so the message isn't as well) tar: backup_homedir.tgz: Function open () failed: access denied tar: unrecoverable error -- tar is closing
I have noticed that on a Mac which is Unix based too there is a different home directory which is NOT /home/user/ but /Users/user. How can I change my home directory in linux to something else? Even as an experiment? Is it possible? and how?
I would like to move the /home directory to a different location, there only seem to be guides on how to move it to it's own partition.
I have a drive (/dev/sda5) mounted as /media/data
I would like to move /home to /media/data/home?
I have tried usermod but get the following error:
Code: test@TestServer:/media/data$ sudo mkdir /media/data/home test@TestServer:/media/data$ ls home lost+found test@TestServer:/media/data$ sudo usermod -dm /media/data/home usermod: user '/media/data/home' does not exist
I have a dual-boot win7 and Ubuntu 10.10 and I want Ubuntu to use my windows user folder as home. I edited fstab to give me ownership and mount it to /mnt/Windows at startup but whenever I change the location of home in the Users and Groups it acts like it is changing it but it never does. I close the settings and when I re-open it, it is set back to /home/me.
I have a secondary disk which holds a /home directory structure from a previous install of Linux. I installed a new version on a new primary drive and mounted this secondary drive as the new /home. Problem is, even though the users are the same names and I can access the home directories for the users, I cannot login directly to their home directories, as I get the following error: -
login as: [me] [me]@[machine]'s password: Last login: Wed Jan 6 18:34:33 2010 from [machine] Could not chdir to home directory /home/[me]: Permission denied [[me]@[machine] /]$
Now, since the usernames are correct and the users are in the passwd file with the correct home directory paths, could it be user ID's that are different or something else? It's not as though I cannot access the home directories for the users, simply that I cannot log directly into them from a login prompt.
Is there anything special about a home directory before users' home directories are stored there, or is just as typical as any other "empty" folder?Let me just cut to the chase, but please no ear ringing about the folly of messing around as root, particularly with directories at root level. I know it's considered stupidity, but I deleted my home directory.
Is there an easy way to restore a working home directory? I tried copying /etc/skel under root, but I'm not sure what a home directory should look like once it has been restored. Besides . & .., there were .screenrc & .xsession in my home directory when I copied /etc/skel. Are these files suppose to be in "/home" or "/home/~" or both?
I am having a problem setting up an encrypted home directory with openSUSE 11.3. I used Yast User and Group Management to edit an existing user to encrypt the home directory and the user.key and user.img files were created in the /home directory. I tried it out and logged in as user and created a new file. I logged out and logged in as a different user and was able to see the newly created file in the first users home directory.
I figured I did something wrong so I went back to Yast and deleted the user. I deleted the /home/user directory using file manager su mode. I tried again to create a new user with an encrypted home directory using Yast and now when Yast tries to write the changes I get an error: "pam_mount is already setup for user. Use --replace to replace the existing entry." I do not know how to proceed from here except to try with a different user name as I do not understand what the error message means and what command to use --replace with.
I've created a folder in /home called share. I am the owner. It has no group access. Others have full access. Is this setup safe? My current setup: Code: /home$ ls eve share lost+found roy I want eve and any future users to have full access to the folder 'share'. I am user 'Roy'.
I'm using Mac OS X's Terminal.app shell to compile and run Fortran programs. One such program resides outside of my home directory (it is in the Applications folder, which resides on my hard drive but seems to be outside of my home folder). How can I navigate into this directory using Terminal.app to run the programs that reside there?
Vanilla install of Karmic (64 bit) - would like to change the Apache doc root to point to /home/sam/www as it's my web development machine. (Default install is working fine) Created copy of 'default' to 'mylocal' in '/etc/apache2/sites-available'
Code: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/sam/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/sam/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ...
The permissions on the folder in my home dir: Code: sam@rocket:~$ ls -la ww* total 16 drwxrwxrwx 2 sam sam 4096 2010-01-09 22:26 . drwx------ 35 sam sam 12288 2010-01-09 22:11 .. -rwxrwxrwx 1 sam sam 100 2010-01-09 22:27 index.html sam@rocket:~$ pwd /home/sam sam@rocket:~$ The sites enabled set up:
Code: root@rocket:/etc/apache2# ls -la sites-enabled/ total 8 drwxr-xr-x 2 root root 4096 2010-01-09 22:24 . drwxr-xr-x 7 root root 4096 2009-12-20 00:22 .. lrwxrwxrwx 1 root root 26 2010-01-09 22:24 mylocal -> ../sites-available/mylocal But I still get: "Forbidden You don't have permission to access / on this server".
I have a strange problem when I do SSH to a FEDORA9 based Linux Server.
When I login using "adah" username in TELNET I am automatically directed to my home directory at location "/media/disk-1/home/adah". But when I use SSH to login using the same username I get the following message Code: Could not chdir to home directory /home/adahaj: Permission denied
I have a dual-boot macbook with an OS X partition and an ubuntu partition. When I first installed ubuntu, I changed my home folder to my OS X home directory to synchronize all my files from both. My home directory is now /media/sda2/Users/username/. In a regular home folder, the icons for Documents, Music, Pictures, Movies, etc. are different (not just with emblems, but actually different icons). But when I changed my home folder, these subfolders' icons stayed the same as regular folder icons and I can't figure out a way to change that default setting. I know how to change the icons for each folder manually, but these changes don't appear everywhere (i.e. nautilus, places, etc). Furthermore, every time I change my icon theme, I would have to manually reassign icons for these folders. Is there a way to globally change the folder icons for these folders?
I need to specify a different path to home directories on a particular server than what LDAP contains for the users, besides using a symlink. E.g. "/Users/jdoe" vs "/home/jdoe" I don't want to change the actual LDAP attributes, just want a particular server to point them in the right direction (Ubuntu 10.04).
I'm assuming it's something I could probably set in pam configurations?
I have Ubuntu Karmic. I chose to install with an encrypted home directory. Recently I got a warning that I only had 2GB of drive space left. This is mostly because of my videos. So I went and bought a new hard drive and partitioned it and made 1 ext4 partition and copied my videos all to the new hard drive. I added a line in my fstab to mount the new hard drive to ~/videos, but when I reboot the computer, there is a screen saying something like "error mounting /home/me/videos, press S to skip or something else to reboot". If I press S to skip, then when my system comes up there is a video directory but it's empty because my other hard drive didn't get mounted. I can run sudo mount /dev/sdb video/ and it will mount fine and I can see all my videos, so why can't fstab mount it? Does this have something to do with my encrypted home directory?
I am interested in setting up a webserver on a PC I have laying around...more for the experience and knowledge of learning it from scratch. I have used dedicated servers before with webhosting, but did not do the installations of apache and other items. The server we had purchased had CentOS installed.
My question is, can I use this desktop I have to simply install the CentOS DVD torrent off their website, and start from there, with installing apache, and all the other items associated with a server environment to test/play around, or is there a difference and something I am missing with my plan to do this?
The end result will be having my desktop setup as a "server" I can ssh into and screw around with just to learn more about it.Sorry for the basic question. (i posted this here instead of the "newbie" section, since i figured it would get moved here)
I grant read privilege to all the users to my .vimrc file . But my colleague still can't read my .vimrc file . I guess in addiction to give the read privilege to the .vimrc file, in some way I should give the person who want to read it the "access right" to my home directory first---which I don't know how to do it.
I am confused that what should be the permssions of home directory because currenlty my users when they log into their home directory , they can see all the contents of /home directory as well..However if i take read all permissions then my sites are not accessible , what should i do The current permissions are 755
I need to backup my /home directory because I want to switch from Fedora to OpenSUSE but I didn't put /home as a separate partition so I need to back it up. Problem is, I can't figure out how.I've tried tar and gzip through every google hit I can possibly find but not one has worked.
This might see a dump question but I will make it anyway .Here is the scenario:I have two users on my Linux Mint installation:
User A User B
I want User A to be able to write on User B home directory, say /home/B.For this I have changed users's B home directory to look like this:ls -ld drwxrwxr-x 36 B music 4096 2010-09-26 10:31 /home/BI have created a "music" group and assigned to /home/B, so all users that are member of "music" are going to be able to write on User B home directory, right?The answer is No! Not here in my box Can you tell me why?Why users under group music can't write on /home/B if B directory is owned by group music and group music has write permissions?
I have tried googling many times for answers, but haven't yet found a solution to my problem (maybe its my selection of search terms).I screwed up my debian system by trying to setup an ftp server with vsftpd very quickly withouteading much documentation (very stupid) as root. I must have screwed up the something to do with the home directory for my user because now cannot even log in with my usual username and password when the computer starts up. All the computer says when I try to log in is:
Unable to cd to 'homemyusername'I can log in as root with Debian single user mode, so I am hoping I can reset my home directory so it works again. Also, I cannot seem to ever get the gnome login screen just a terminal login screen.
I installed the beta of Ubuntu 9.10 Karmic, and I am now stuck with a barely usable system, so I am going to remove it. I've already backed up the home directory, and what I was wondering is this:If I were to install a completely different distro, like, say, OpenSUSE, would I be able to copy back my home directory without problems and have things still work, or would I have to reinstall Karmic? I had always believed that Linux distros were more or less the same except for cosmetic differences, but this seems like it'd be a different case somehow..
I created a partition in my hard disk for my data (documents, multimedia, etc.).How can I:Move the /home/ directory to the new partitionMake the OS (Ubuntu Linux) treat that directory as the default /home/.