Solved

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

Posted on 2009-04-09
1
332 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Mailserver setup & redundancy 2 83
awk sed variable in file 3 98
Cannot seems to get SSHD running CentOS 6.5 3 16
Shrink Linux Swap File Size CentOS 10 30
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

726 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