Can't rename file in drive using Linux operating system

Hi, I have a weird problem. I have the wd tv live hub set up on the network and I can access it and rename/delete/move files from my windows machine no problem.

I recently installed Elementary OS (based on Ubuntu) on another computer. I mapped the drive and I am able to copy files to the Hub, however, it won’t let me rename them. It will allow me to delete them and rename them by deleting characters to the file name ( but I can’t add or change letters). I get an error message saying that this operation is not possible because he drive is in use…

Anyways, I’ve looked everywhere for a solution for this and can’t find anything.

Any help would be great!

Thanks,
G

I’ve never used elementry OS

but if it’s similiar to ubuntu

how are you accessing the drive, browing via file manager network shares ??

I recommend to mount the smb share on your machine

lots of examples online

then you can access everything as if it was a local drive

It is based off of ubuntu 12.04.

I have accessed the drive in two ways and the problem still exists:  I navigated to the folder though the “network devices” and also directly to the folder because i added to the home file directory…

I believe the smb is already mounted on my machine because when i right click on it it gives me the option to unmount

have you tried cmd line?

with root access?

ubuntu preface your cmds with sudo

 generally speaking the id you browse the gui with does not have root access

once root, you can try chmod 777 /your/file/location

this will make the file writably by anybody

I tried using the Chmod 777 command but it says the directory coultn be found.  i used the smb//mediaplayer/wdtvlivehub/ and other combinations of that directory but all of them couldnt be found.

Whats even more weird. I was able to create a new folder on the Hub.

Anyone know why it cant find the directory?

G_Dogg wrote:

I tried using the Chmod 777 command but it says the directory coultn be found.  i used the smb//mediaplayer/wdtvlivehub/ and other combinations of that directory but all of them couldnt be found.

 

Whats even more weird. I was able to create a new folder on the Hub.

 

Anyone know why it cant find the directory?

if you’re using some path like smb//blah/blah …

then the drive is not mounted

smb indicated cifis network share

which brings me back to my first suggestion

mount the drive

mounted drive appear as if they were local

so path would be a plane jane /path/to/your/folder

no protocols indicated in the path

Ok,I’ll definetly give this a shot.  One thing though, I right clicked on the drive and the option to unmount was there but when i clicked it it said it was busy.  So i guess it really isnt mounted.

Thanks again, ill let you know how it goes.

So I was able to get it mounted and then I had to reinstall Luna because the kernel update crashed it… Somethign to do with my virtual box.  Anyways, Since I will be starting fresh, here is the command lines I plan on running to get this to permanently mounted:  some of the code is on two lines but it should be on one line.

I was able to temporaily mount the wdtvlive but i havent tried the fstab part of the code yet, what do you guys think?

G

apt-get install cifs-utilmkdir ~/wdtvlivesudo mount -t cifs //192.168.0.12/wdtvlive /wdtvlive -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777sudo cp /etc/fstab /etc/fstab_old//192.168.0.12/sharename /wdtvlive cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0sudo mount -a

It’s redundant.  

You can either mount manually (your first steps)

… or mount automatically (via fstab edits and mount -a).

But you don’t need to do both.  

Your commands look spot on.

BTW, the mount -a only needs to be done once after you edit the fstab.    No need to ever do it again.

good point, i didnt realize that it was two seperate steps, i thought the first part mounted it and the second part ensures it is mounted. So to confirm, the fstab entry mounts it as well as makign it permanent?

just learnign linux, this is both inspiring and frustrating all at the same time!

G

Sorta.

Editing FSTAB means it will automatically be mounted at each boot.

doing the mount -a just tells the system to mount EVERYTHING in the /etc/fstab file that hasn’t already been mounted.

So you basically only ever do “mount -a” whenever you’ve editted the fstab file.

Also keep in mind that mount -a won’t ever “unmount” anything.

So if you delete something from /etc/fstab, you always need to manually unmount it if you want it unmounted immediately.

makes sense, i guess the reason for the -a was to see if it was successfully mounted.

G

So i tried all weekend to mount the drive usuing the code from page one. i kept getting an error that said something about guest to guest (i dont know the exact error because i am at work)

I have no idea how to get this mounted. nothing seems to work

Well, we’ll need to know the exact error message in order to help…

yep, exact error message would help

but sounds like a permission issue

also make sure you’re root

typically only root will have permission to mount

so use sudo or whatever it is for your linux variant

Ok, so I’ve pasted the entire command line below:

greg@GregDesktop:~$ sudo smbmount -t smbfs //192.168.0.12/wdtvlive /wdtvlive -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
[sudo] password for greg: 
Warning: mapping 'guest' to 'guest,sec=none'
/sbin/mount.cifs: invalid option -- 't'

Usage: mount.cifs <remotetarget> <dir> -o <options>

Mount the remote target, specified as a UNC name, to a local directory.

Options:
	user=<arg>
	pass=<arg>
	dom=<arg>

Less commonly used options:
	credentials=<filename>,guest,perm,noperm,setuids,nosetuids,rw,ro,
	sep=<char>,iocharset=<codepage>,suid,nosuid,exec,noexec,serverino,
	mapchars,nomapchars,nolock,servernetbiosname=<SRV_RFC1001NAME>
	directio,nounix,cifsacl,sec=<authentication mechanism>,sign,fsc

Options not needed for servers supporting CIFS Unix extensions
	(e.g. unneeded for mounts to most Samba versions):
	uid=<uid>,gid=<gid>,dir_mode=<mode>,file_mode=<mode>,sfu

Rarely used options:
	port=<tcpport>,rsize=<size>,wsize=<size>,unc=<unc_name>,ip=<ip_address>,
	dev,nodev,nouser_xattr,netbiosname=<OUR_RFC1001NAME>,hard,soft,intr,
	nointr,ignorecase,noposixpaths,noacl,prefixpath=<path>,nobrl

Options are described in more detail in the manual page
	man 8 mount.cifs

To display the version number of the mount helper:
	mount.cifs -V
greg@GregDesktop:~$

that is actually a syntax error

here what I would try

mkdir /wdtvlive

sudo mount -t smb //192.168.0.12/wdtvlive /wdtvlive -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777

probably most of those options are not needed, but also should not pose a problem

thanks , i will try that. will post back with the results when i get home

G

So i tried the new code above. I had to change the mount name because for some reason it didnt fully delete it.  anyways i got the following error:

not sure whats going on here, any thoughts?

greg@GregDesktop:~$ sudo mkdir /MediaPlayer
greg@GregDesktop:~$ sudo mount -t smb //192.168.0.12/MediaPlayer /MediaPlayer -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
mount: unknown filesystem type 'smb'
greg@GregDesktop:~$

Most linux builds call it cifs now.

so try mount -t cifs.

If that doesn’t work, make sure you have the cifs-utils package installed.