Solved

How do I delete a file with special characters in Linux that has been created by SAMBA?

Posted on 2009-04-09
1
329 Views
Last Modified: 2013-12-16
I use Samba for my fileserver. Files created from Windows with spaces and special characters create problems. From Windows I can delete or rename the files, but not from the command prompt on the server. I need to be able to delete or rename the files from Linux, not just from Windows.

Server: RHEL 5

"Filsystem med kun lesetilgang" is Norwegian and means "Filesystem with only read access".
[root@mymachine div]# ll

totalt 128

-rwxr-x--- 1 hans felles 41483 jun 17  2007 Bilde 016.jpg

-rwxr-x--- 1 hans felles 33008 jun 17  2007 div 2 ?r 001.jpg

-rwxr-x--- 1 hans felles 33008 jun 17  2007 div 2 ?r 001.jpg

[root@mymachine div]# 
 
 

[root@mymachine div]# rm -f *

rm: cannot remove «Bilde 016.jpg»: Filsystem med kun lesetilgang

rm: cannot remove «div 2 \345r 001.jpg»: Filsystem med kun lesetilgang

rm: cannot remove «div 2 \206r 001.jpg»: Filsystem med kun lesetilgang

[root@mymachine div]#

Open in new window

0
Comment
Question by:ictb
1 Comment
 

Accepted Solution

by:
chiragypatil earned 125 total points
ID: 24105401
The error message says
rm: cannot remove «Bilde 016.jpg»:
which means the file name is being read as a whole. The problem here ,i think, is read access.
Try to unmount the file system and then mount the file system again with read and write permissions for the root user.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now