LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-05-2011, 04:25 PM   #1
Rheotron
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Rep: Reputation: 0
Ubuntu as a server troubles


Hi everyone,

Yesterday I installed ubuntu 10.10 on an old laptop I had lying around using the alternate install so I only have the command line. Basically, what I wanted to do was set it up as a bit torrent box which downloads to an external hard drive (FAT32) which then shares the contents of the drive as a samba share. So I've been able to mount the drive and I've installed the deluge torrent client which I can access via the web ui.I can see the shares that I've made on my other networked computers. I'm having two main problems though, firstly I cannot edit or delete files on my samba share, I'm not to worried about security considering I'm going to be the only one using it and I want to be able to move files around from my MacBook without going into the command line whenever I want to move a file. Secondly, deluge will not download to my external drive for some reason. Whenever I start the download with the save path to my external drive, the torrent just gets stuck at the checking stage and does nothing, on the other hand if I download to my home folder I have no trouble whatsoever and the torrent downloads fine. I'm thinking it's something to do with the permissions or the drive not mounting properly or something but as yet I haven't been able to figure it out. Any help is appreciated, thanks!
 
Old 01-05-2011, 06:47 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hi, welcome to LQ!

What mount options are set for the external HDD, which user is
deluge running as?

And what is the config-entry in smb.conf for the external HDD?



Cheers,
Tink
 
Old 01-05-2011, 08:25 PM   #3
Rheotron
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Hi,

Um, I'm not sure what you mean by mount options. All I know is that I've set it up to mount at /media/PRIMARY. Deluge is running as the only user that I've made, I haven't tried running at as root yet.

As for my smb.conf, it has since managed to delete itself so the SAMBA share is now missing. I'm thinking that there would be an easier way to set up a SAMBA share through the GUI?
 
Old 01-05-2011, 09:37 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Can you copy & paste the output of
Code:
sudo mount
(preferably in code tags)?

Samba is actually quite simple to set-up if you're left w/ the
commented stock smb.conf as shipped w/ the samba source.

For your share you'd probably un-comment 4 lines and change
one of those to point at your mount-point. Easy as pie.


Cheers,
Tink
 
Old 01-05-2011, 09:55 PM   #5
Rheotron
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Output of sudo mount:

Code:
/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
/dev/sdc1 on /media/sdc1 type vfat (rw)
/dev/sdb1 on /media/Primary type vfat (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sdb1 on /media/Primary is the drive that I'm trying to set up Samba with.
 
Old 01-06-2011, 01:02 AM   #6
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Rep: Reputation: 167Reputation: 167
If you're not sure if Samba is set up correctly, using webmin might help. I couldn't say for sure if it's in Ubuntu repo's though.
http://www.webmin.com/
Quote:
Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely. See the standard modules page for a list of all the functions built into Webmin, or check out the screenshots.
 
Old 01-06-2011, 01:30 AM   #7
Rheotron
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Hi everyone, I've set up Samba and I'm sharing my files across the network. I can see them fine, create new folders and everything. I've got Transmission running for torrents, downloading to a directory on my drive. The problem I'm having it opening multi-part rar torrents. I've tried from my macbook with multiple programs, from window's machines and from linux itself through SSH but it still won't work. I get a message something like 'the contents of the file cannot be extracted with this program' and 'torrent.rar is not RAR archive, No files to extract'. I've tried copying the files to my hard drive and unraring them but it's also not working. Any ideas? I might go back to deluge if this isn't working.

EDIT: I've just managed to find out that on the .rar files themselves I seem to only have read permission, I guess that will do it. Is there anyway to make sure that I have full permissions on all directories and files created?

Last edited by Rheotron; 01-06-2011 at 01:53 AM.
 
Old 01-06-2011, 02:06 AM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Can you please post the output of
Code:
ls -ld   /media/Primary
? And if it's not too private, also
Code:
ls -l  /media/Primary
Just so we get an idea as which user and with which perms the
drive is being handled. Does the drive get mounted via udev
hot-plugging, has it got an /etc/fstab entry?

Let's get the torrent side of things working first, then tackle
samba after that.


Cheers,
Tink
 
Old 01-06-2011, 03:32 AM   #9
Rheotron
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Changed the mount name from Primary to PRIMARY_

Code:
ls -ld /media/PRIMARY_
drwx------ 2 root root 4096 2011-01-06 19:14 /media/PRIMARY_
Code:
ls -l /media/PRIMARY_ (had to run as root got permission denied)
total 0
I have no idea about the udev thing, and no it doesn't have an fstab entry.

I think I've got the torrent thing working, I can download to the drive, I just can't unrar files from the torrents. :?

Thanks
 
Old 01-06-2011, 04:16 AM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Using the uid & gid mount options, you can change the ownership of the filesystem on the vfat external drive.

What is the size of the files? You may be exceeding filesize limitations of fat32. If you use samba to transfer files to your Mac, you can use a linux filesystem on the external drive to remove this limitation.

If not, transfer the rar files and unrar them on the mac.
 
Old 01-06-2011, 04:17 AM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Using the uid & gid mount options, you can change the ownership of the filesystem on the vfat external drive.

What is the size of the files? You may be exceeding filesize limitations of fat32. If you use samba to transfer files to your Mac, you can use a linux filesystem on the external drive to remove this limitation.

If not, transfer the rar files and unrar them on the mac.
 
Old 01-06-2011, 05:15 AM   #12
Rheotron
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
They shouldn't be exceeding the file limit, it's like 15MB per rar.
 
Old 01-06-2011, 09:51 AM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by Rheotron View Post
Changed the mount name from Primary to PRIMARY_

Code:
ls -ld /media/PRIMARY_
drwx------ 2 root root 4096 2011-01-06 19:14 /media/PRIMARY_
Code:
ls -l /media/PRIMARY_ (had to run as root got permission denied)
total 0
I have no idea about the udev thing, and no it doesn't have an fstab entry.

I think I've got the torrent thing working, I can download to the drive, I just can't unrar files from the torrents. :?

Thanks
OK, so if your respective torrent client doesn't run as root
it won't be able to write to the device - not a desirable status
of things. As I have no idea how *buntu determines what options
to use for the auto-mount (where did you do the change from
Primary to PRIMARY_, btw?) and there's no fstab entry I'm moving
this over to *buntu for more specific advice. In Slackware (RedHat,
... ) I'd just modify the relevant fstab line to a) have a umask
of 775, and b) add a uid=xxx that matches the user running the
torrent client.



Cheers,
Tink
 
Old 01-06-2011, 03:53 PM   #14
Rheotron
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Ok, I think I did it right, not too sure. This is what my fstab file looks like now

Code:
/dev/fd0                                   /media/floppy0  auto  rw,user,noauto$
/dev/sdb2                                  /media/PRIMARY_  vfat umask=775,uid=$
/dev/sdc1                                  /media/sdc1     vfat  defaults      $
/dev/sr1                                   none            udf   rw,noauto     $
I changed Primary to PRIMARY_ by reformatting the drive, didn't do it on purpose lol.

I'm about to go test it out and see if it works. Will I have to redownload the torrent to see if it works or should I just be able to unrar straight away?

EDIT: The weird thing is, on my mac it's showing up that I can read and write in all the files and folders. Do I also need execute permissions to unrar files?

Last edited by Rheotron; 01-06-2011 at 03:56 PM.
 
Old 01-06-2011, 06:26 PM   #15
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hard-coding the external drive w/ a something like /dev/sdb2 bears
a certain risk ... if you ever add another device it may come out
as a DIFFERENT drive, e.g., /dev/sdc2 or /dev/sdf2 ...

Last edited by XavierP; 01-06-2011 at 09:43 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB 0.97 troubles (XP,ubuntu kk,fedora 12) symidran Linux - General 8 12-14-2009 08:13 PM
Im having troubles with visual effects on ubuntu 9.4 golgo Linux - Software 1 10-06-2009 01:29 AM
Ubuntu Video Troubles shorto Linux - Newbie 5 06-19-2007 05:33 AM
Ubuntu server DHCP troubles. Compliant Ubuntu 1 04-24-2007 01:35 PM
Ubuntu troubles somebodyconfused Linux - Laptop and Netbook 3 04-09-2006 03:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration