Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18th November 2011, 06:19 PM
Shway Offline
Registered User
 
Join Date: Nov 2011
Posts: 6
linuxfirefox
Question Can't unRAR from one shared folder to another

Hello, this is my first post and new to Fedora 16 and Linux so I am hoping that someone will be able to help me out

I am trying to access my windows shared folders and unRAR into another shared folder.

I cannot do it using smb/computer-name/folder name as PeaZip will not let me.

So I mounted the share using:

$ mount -t cifs //computer-name/Folder-Name -o username=vivek,password=myPassword /mnt/Folder-Name/

This is so it will appear as mnt/Shared Folder Name and contain the files from the Share.


Now when I do this I do not have the ability to change any files in those folders or add files to them as I want to do.

Any help would be most appreciated and also if anyone has any tips or "simple to follow" guides to help me on my way.

Thanks a bunch.

P.S I am not sure how to make the box to show the command code like everyone else on the Forums, sorry about that.

Last edited by Shway; 18th November 2011 at 06:35 PM.
Reply With Quote
  #2  
Old 18th November 2011, 06:37 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 5,019
linuxchrome
Re: Can't unRAR from one shared folder to another

To make the box to show code, you type a bracket [ then the word code then the other bracket ].

Type your code. Then, end it by doing bracket /code bracket, with a slash in front of the word code this time.

I'm not sure how you set up your Windows shares, but if you mount it as a user with permission to change the files in Windows it should work.

For example, assuming you log onto Windows with username vivek and password myPassword. Now, you can go into those shared folders and change files there?

Ah--I think I _might_ see the problem. Instead of mounting it on /mnt/Folder-Name, as user vivek (assuming that's also your Linux user name), make a directory in /home/vivek (on the Linux box) called say, smbmount.

Now
Code:
$ mount -t cifs //computer-name/Folder-Name -o username=vivek,password=myPassword /home/vivek/smbmount
See if you can then edit them.[
Reply With Quote
  #3  
Old 18th November 2011, 07:20 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141
linuxfirefox
Re: Can't unRAR from one shared folder to another

One way to get around the "permissions" issue when doing a cifs mount of a Windows share, instead of using a mount point in your user home directory, is to make the mount point directory itself owned by the user, and, use the uid= and gid= options to set your user id in the mount command (or fstab file). This way, you will always have full rw access.
On the F12 machine I'm typing this from, these are the mount points I have set for cifs mounts of network windows shares and ntfs-3g mounts of local hdd ntfs partitions:
Code:
BASH:~/-> ll /media/
total 32
drwxr-xr-x. 2 paulm paulm 4096 2011-01-31 17:15 alyx
drwxr-xr-x. 2 paulm paulm 4096 2011-04-25 15:52 backup
drwxr-xr-x. 2 paulm paulm 4096 2009-11-29 17:38 cortana
drwxrwxrwx. 1 paulm paulm 8192 2011-11-09 11:02 data
drwxr-xr-x. 2 paulm paulm 4096 2011-04-24 22:29 storage
drwxr-xr-x. 2 paulm paulm 4096 2009-11-29 17:38 w2k
drwxr-xr-x. 2 paulm paulm 4096 2011-04-21 13:02 w7
If you are on F15 or F16, you'd want to use /mnt instead of /media. Note that all the mount points are owned by me (paulm), not root. And a couple of my fstab entries which enable me to do quick mounts:
Code:
BASH:~/-> cat /etc/fstab | grep cifs
//cortana/MyData	/media/cortana		cifs	uid=500,gid=500,noauto,sec=none 0 0
//alyx/Data		/media/alyx		cifs	uid=500,gid=500,noauto,sec=none 0 0
Adjust your mount points and options as needed. With the above entries in fstab, I can just do:
Code:
sudo mount /media/alyx
..and I've got full acces to //alyx/Data on my wife's W7 laptop data partition. In order for the mount to resolve //alyx, in my /etc/hosts file is:
Code:
BASH:~/-> cat /etc/hosts | grep alyx
192.168.1.4	alyx
I have my Netgear router configured to always assign that laptop that network address.

Last edited by PabloTwo; 18th November 2011 at 07:28 PM.
Reply With Quote
  #4  
Old 18th November 2011, 07:30 PM
Shway Offline
Registered User
 
Join Date: Nov 2011
Posts: 6
linuxfirefox
Re: Can't unRAR from one shared folder to another

Quote:
Originally Posted by smr54 View Post
To make the box to show code, you type a bracket [ then the word code then the other bracket ].

Type your code. Then, end it by doing bracket /code bracket, with a slash in front of the word code this time.

I'm not sure how you set up your Windows shares, but if you mount it as a user with permission to change the files in Windows it should work.

For example, assuming you log onto Windows with username vivek and password myPassword. Now, you can go into those shared folders and change files there?

Ah--I think I _might_ see the problem. Instead of mounting it on /mnt/Folder-Name, as user vivek (assuming that's also your Linux user name), make a directory in /home/vivek (on the Linux box) called say, smbmount.

Now
Code:
$ mount -t cifs //computer-name/Folder-Name -o username=vivek,password=myPassword /home/vivek/smbmount
See if you can then edit them.[
Thanks for telling me about the code box and for the time to help me out.

Okay I did attempt to do that, however nothing appears at all in the /home/vivek/smbmount when I try to do it again I get:

Code:
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Any thoughts?
Reply With Quote
  #5  
Old 18th November 2011, 07:45 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141
linuxfirefox
Re: Can't unRAR from one shared folder to another

The above mount command puts the options between the device to be mounted and the mount point. Wrong. Either put your options list first or last.
And you might want to use the mount.cifs command instead of mount -t cifs. Example:
Code:
mount.cifs //cortana/Data /media/cortana -o uid=500,gid=500,credentials=/home/paulm/.credentials_cortana
Reply With Quote
  #6  
Old 18th November 2011, 07:54 PM
Shway Offline
Registered User
 
Join Date: Nov 2011
Posts: 6
linuxfirefox
Re: Can't unRAR from one shared folder to another

Quote:
Originally Posted by PabloTwo View Post
The above mount command puts the options between the device to be mounted and the mount point. Wrong. Either put your options list first or last.
And you might want to use the mount.cifs command instead of mount -t cifs. Example:
Code:
mount.cifs //cortana/Data /media/cortana -o uid=500,gid=500,credentials=/home/paulm/.credentials_cortana
Okay, most of that is over my head. Could you elaborate a little more for me please? I am not sure where to put my information in place of yours. I apperciate your patience.
Reply With Quote
  #7  
Old 18th November 2011, 08:18 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141
linuxfirefox
Re: Can't unRAR from one shared folder to another

Use "man mount" and "man mount.cifs" in a terminal to read the man(ual) pages for each. Using mount.cifs at the command line, for example, as root:
Code:
mount.cifs //computer-name/Share-Name  /mnt/Folder-Name/ -o uid=vivek,gid=vivek,user=vivek,password=myPassword
If the above doesn't give you rw permissions on the mounted network share, then chown Folder-Name to be owned by vivek:
Code:
# chown vivek:vivek /mnt/Folder-Name
If it can't find //computer-name, then substitute the actual ip_address of that computer instead of computer-name.

Once you get the command line mount.cifs working, you can then add a line to your /etc/fstab file if you wish, to simplify and speed up the mount process. The format of the fstab file is similar to, but slightly different than what you use on the command line.
Reply With Quote
  #8  
Old 18th November 2011, 10:29 PM
Shway Offline
Registered User
 
Join Date: Nov 2011
Posts: 6
linuxfirefox
Re: Can't unRAR from one shared folder to another

Quote:
Originally Posted by PabloTwo View Post
Use "man mount" and "man mount.cifs" in a terminal to read the man(ual) pages for each. Using mount.cifs at the command line, for example, as root:
Code:
mount.cifs //computer-name/Share-Name  /mnt/Folder-Name/ -o uid=vivek,gid=vivek,user=vivek,password=myPassword
If the above doesn't give you rw permissions on the mounted network share, then chown Folder-Name to be owned by vivek:
Code:
# chown vivek:vivek /mnt/Folder-Name
If it can't find //computer-name, then substitute the actual ip_address of that computer instead of computer-name.

Once you get the command line mount.cifs working, you can then add a line to your /etc/fstab file if you wish, to simplify and speed up the mount process. The format of the fstab file is similar to, but slightly different than what you use on the command line.

Okay, I used
Code:
# chown vivek:vivek /mnt/Folder-Name
However I get
Code:
# chown: changing ownership of `/mnt/SVR-Freshstack/': Permission denied
I made sure I was the root by using
Code:
 su
Was there something I missed or need to do something else?

Last edited by Shway; 18th November 2011 at 10:32 PM.
Reply With Quote
  #9  
Old 18th November 2011, 11:20 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141
linuxfirefox
Re: Can't unRAR from one shared folder to another

Switch to root using "su -" instead of just "su". That's su followed by a space then a hyphen. Then try the chown command again. Should work this time.
Reply With Quote
  #10  
Old 19th November 2011, 06:27 AM
Shway Offline
Registered User
 
Join Date: Nov 2011
Posts: 6
linuxfirefox
Re: Can't unRAR from one shared folder to another

Okay, back again. Two things to report, however I feel like I am close.
First up, I used the command
Code:
su -chown vivek:vivek /mnt/Fresh
However I got
Code:
su: user vivek:vivek does not exist
Is there a user name that is special?

NOW
2nd, is there a way I can have these mounts come up each boot, as I am having to mount them everytime after I restart.

Thank you in advance!

Last edited by Shway; 19th November 2011 at 06:49 AM.
Reply With Quote
  #11  
Old 19th November 2011, 07:04 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141
linuxfirefox
Re: Can't unRAR from one shared folder to another

You first change to root using the "su -" command, then use the chown command. I am assuming your regular user name is vivek. If it is not, then use the correct name, or id number. The "id" command, while you are regular user before switching to the root user, will show you your $USER name and user id number, among other things.
Code:
su -
enter roots password
chown vivek:vivek /mnt/Fresh
Assuming vivek is your regular user name and /mnt/Fresh is the directory you have created and want to do a cifs windows share mount to.

You can have these mounts come up automatically at boot up. That's where the /etc/fstab file comes in.
Are you still getting write permissions problems after you do a manual mount? That's the whole reason for making vivek the owner of the directory where the mount takes place.
Reply With Quote
  #12  
Old 20th November 2011, 07:20 AM
Shway Offline
Registered User
 
Join Date: Nov 2011
Posts: 6
linuxfirefox
Re: Can't unRAR from one shared folder to another

So I tried a few things Heres what I got.

Code:
# su - vivek chown /mnt/Fresh
/bin/chown: /bin/chown: cannot execute binary file
I was reading through the --help and saw some info and tried
Code:
# su - vivek chown root /mnt/Fresh
/bin/chown: /bin/chown: cannot execute binary file
What do you think?

Thanks to all!!

Last edited by Shway; 20th November 2011 at 07:21 AM. Reason: Grammer, Spelling etc.
Reply With Quote
  #13  
Old 20th November 2011, 12:11 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 5,019
linuxchrome
Re: Can't unRAR from one shared folder to another

Is anything mounted on Fresh right now? As I mentioned before, I prefer to mount these things in my home directory, which sometimes helps.

If you're typing exactly what you've posted, you're trying to do this as user vivek, not as root.

Have you done

su -
<then, when prompted, put in root's password>

Right now it looks as if you're trying to, as user vivek, change something's ownership to root.

Anyway, you haven't typed what Pablo suggested. Type that and see what happens. Exactly as he typed it, that's why he put it in neat code blocks for you.
Reply With Quote
Reply

Tags
folder, shared, unrar

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not access the shared folder anantg Servers & Networking 10 14th September 2011 08:59 AM
I can't access shared folder MMaghraby Servers & Networking 6 28th December 2008 03:06 PM
windos shared folder.... elf_aka Using Fedora 2 21st May 2008 11:53 AM
Connecting to shared folder vybzk Using Fedora 3 7th March 2007 04:53 AM
Shared directory/folder - How ? mha Using Fedora 4 9th April 2005 03:40 PM


Current GMT-time: 00:52 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat