permently mount on linux

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

I have a CentOS box that I use for file sharing and development on my local lan and I'm trying figure out how to mount some folders on it to my desktop running Ubuntu 7.10 Gusty.

I would of through that the mount command would do it, however Im not really sure of the path, I've only shared it to my window desktops before, never done a linux to linux lol.

Every time I search the net for something on mount a linux shared folder, I get Samba and Windows file sharing, nothing on linux.


EDIT
I managed to make a SSH connection with the GUI Utility, however Im looking to mount the drive so that I can easily access it via a program.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

Are you saying that you have 2 Linux machines and want to mount the folders on machine 2 that exist on machine 1?

If so, look at http://www.cyberciti.biz/tips/linux-mou ... -time.html

If that's not it, search google for
mount remote filesystem /etc/fstab
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

The above link doesn't say anything about setting up the server side of things.

On CentOS:
Code: [ Select ]
yum -y install nfs-utils
vi /etc/exports
  1. yum -y install nfs-utils
  2. vi /etc/exports

In /etc/exports, add a line for each share/host you want to export to:
Code: [ Select ]
/srv                  192.168.0.0/255.255.0.0(rw,sync,nohide)

restart nfs:
Code: [ Select ]
/etc/init.d/nfs restart


On your workstation, create your mountpoint,
Code: [ Select ]
mkdir /path/where/I/want/centos/srv

and add an entry to your /etc/fstab:
Code: [ Select ]
192.168.x.x:/srv /path/where/I/want/centos/srv nfs defaults 0 0

Then mount:
Code: [ Select ]
mount -a
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

The original poster just said file sharing which doesn't require server daemons.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

I get the following error:

Quote:
mount: wrong fs type, bad option, bad superblock on 192.168.0.100:/home,
......
......


However after doing some searching fixed it, I changed the ip in /etc/exports to a ip of the system I wanted to export too, however I'm not sure if it was necessary. (192.168.0.0 should, I believe, broadcast to the router and everything on the network?). Also my ubuntu machine didn't have nfs-common install so I had to install that, after doing that everything worked out.

Thanks.
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

As far as I know 192.168.0.255 is the broadcast address.
  • vijayan
  • Beginner
  • Beginner
  • vijayan
  • Posts: 52
  • Loc: india

Post 3+ Months Ago

Hi,

I think this link useful for u

http://www.redhat.com/docs/manuals/ente ... mount.html
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

I guess I should point out that this is for a class B (255.255.0.0):
Code: [ Select ]
192.168.0.0/255.255.0.0

just put your network and mask there, which is probably 255.255.255.0
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

this213 wrote:
, which is probably 255.255.255.0

we have a winner imo lol
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Well I started to edit some files and found that I cant save any files that were already in the folder after I mounted. Basically if I didn't create it I cant edit it. Where would I got edit the permissions?
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

su to root and you won't have that problem.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Ya, I would but ubuntu's root password is locked within the system so you cant. I really should just install Fedora Core.
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

http://www.debuntu.org/2006/04/24/34-ubuntu-d

^How to gain a root shell. ^
__________________________
I can't believe Ubuntu doesn't let one create a root account during the install. Who's idea was that?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

what you need to do is make sure your user ID is the same on both systems, which may require you to recreate your user on one of the systems specifying the user ID and group ID.

Just having the same username means nothing. If you pick a directory and do "ls -ln", this will show you the user and group ids for the files there. So, assuming you see something like:
Code: [ Select ]
$ ls -ln ~/
drwxr-xr-x 2 1012 1010 4096 2008-01-18 09:16 Desktop
drwxr-xr-x 1 1012 1010 4096 2007-06-25 23:57 Documents
  1. $ ls -ln ~/
  2. drwxr-xr-x 2 1012 1010 4096 2008-01-18 09:16 Desktop
  3. drwxr-xr-x 1 1012 1010 4096 2007-06-25 23:57 Documents

You'd then want your user to have a user ID of 1012 and a group ID of 1010. In order to assign a user to a given group, the group must exist first. So, to create this user properly:
Code: [ Select ]
# /usr/sbin/groupadd -g 1010 someuser
# /usr/sbin/useradd someuser -u 1012 -g 1010
  1. # /usr/sbin/groupadd -g 1010 someuser
  2. # /usr/sbin/useradd someuser -u 1012 -g 1010

SpooF wrote:
I really should just install Fedora Core.

Yes, Fedora beats Ubuntu hands down
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Don2007 wrote:
http://www.debuntu.org/2006/04/24/34-ubuntu-d

Dead link

Is there any way to change who own the directory, or atleast change the group? I use my CentOS box as a development server. I'm running WebMin and VirtualMin to create/manage my services. So when I create a new virtual host it creates a new account. So all the directory's i want to access have different user.

Quote:
drwxrwxrwx 7 503 504 4096 Mar 19 21:45 alliedwebs
drwxrwxrwx 7 502 503 4096 Feb 29 22:38 drunklosers
drwxrwxrwx 7 504 505 4096 Mar 15 16:17 mytracktees
drwxr-xr-x 13 500 500 4096 Mar 3 13:09 system
drwx------ 17 500 500 4096 Mar 12 19:19 travis
drwxrwxrwx 7 501 501 4096 Feb 10 18:31 travisperson


If I change the group of all the directories to the same one, then I if I add my username to that group I should be able to edit the file correct? I would still have to make sure my user on the CentOS System is the same as my desktop right?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Yes, that's correct. You'd want a command something like:
Code: [ Select ]
# chgrp -Rf mygroup /directory

As a side note, you can change full ownership with something like:
Code: [ Select ]
# chown -Rf user:group /directory


You may want to look into making that CentOS box an NIS server, which could alleviate all these user mapping issues. NIS and NFS usually go hand in hand.
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

http://www.debuntu.org/2006/04/24/34-ub ... e-sudo-way

It's not a dead link. I just went back to it a few minutes ago.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

Don2007 wrote:
http://www.debuntu.org/2006/04/24/34-ubuntu-default-root-password-or-the-sudo-way

It's not a dead link. I just went back to it a few minutes ago.

thats also not the same link as the first one you posted >.<
you forgot the efault-root-password-or-the-sudo-way
at the end of the link.
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

Maybe half of the link was lost for some reason.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

evidently :P

Post Information

  • Total Posts in this topic: 20 posts
  • Users browsing this forum: No registered users and 33 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.