
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title> &#187; problem removing files</title>
	<atom:link href="https://www.nikeshshk.com.np/tag/problem-removing-files/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.nikeshshk.com.np</link>
	<description></description>
	<lastBuildDate>Tue, 04 Nov 2025 10:25:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.4</generator>
	<item>
		<title>Ever been Hacked and now you can&#8217;t delete the file&#8230;Operation not permitted</title>
		<link>https://www.nikeshshk.com.np/news/ever-been-hacked-and-now-you-cant-delete-the-file-operation-not-permitted/</link>
		<comments>https://www.nikeshshk.com.np/news/ever-been-hacked-and-now-you-cant-delete-the-file-operation-not-permitted/#comments</comments>
		<pubDate>Wed, 16 Apr 2014 16:40:48 +0000</pubDate>
		<dc:creator><![CDATA[Nikesh Shakya]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[lsattr]]></category>
		<category><![CDATA[problem removing files]]></category>
		<category><![CDATA[remove file linux]]></category>

		<guid isPermaLink="false">http://www.nikeshshk.com.np/?p=664</guid>
		<description><![CDATA[You can check the file and ownership permissions as well as if the file is set to immutable with these commands in root SSH: ls -lah /home/username/public_html/pathtofile lsattr /home/username/public_html/pathtofile The first command will show the file and ownership permissions. If they are 000 or root:root, the root user should still be able to remove the file regardless with this command: cd /home/username/public_html/pathtofolder rm filename People can really get into trouble by running rm commands without ensuring they are at the correct directory path for the removal. Next, the &#8220;lsattr&#8221; command above, the second one, will show if there are any attributes set on the file. If you see a -i on the lsattr command, then run this command to unset that attribute: chattr -i /home/username/public_html/pathtofile This will remove that immutable file attribute. What immutable does would be preventing changing and removing a file. If the file has that set on it, even the root user cannot remove the file and&#160;<a href="https://www.nikeshshk.com.np/news/ever-been-hacked-and-now-you-cant-delete-the-file-operation-not-permitted/" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>You can check the file and ownership permissions as well as if the file is set to immutable with these commands in root SSH:</p>
<p><code>ls -lah /home/username/public_html/pathtofile<br />
lsattr /home/username/public_html/pathtofile<br />
</code></p>
<p>The first command will show the file and ownership permissions. If they are 000 or root:root, the root user should still be able to remove the file regardless with this command:</p>
<p><code>cd /home/username/public_html/pathtofolder<br />
rm filename</code></p>
<p>People can really get into trouble by running rm commands without ensuring they are at the correct directory path for the removal.</p>
<p>Next, the &#8220;lsattr&#8221; command above, the second one, will show if there are any attributes set on the file. If you see a -i on the lsattr command, then run this command to unset that attribute:</p>
<p><code>chattr -i /home/username/public_html/pathtofile</code></p>
<p>This will remove that immutable file attribute. What immutable does would be preventing changing and removing a file. If the file has that set on it, even the root user cannot remove the file and this is my suspicion on what might be happening if you haven&#8217;t been able to remove it even as the root user in root SSH.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.nikeshshk.com.np/news/ever-been-hacked-and-now-you-cant-delete-the-file-operation-not-permitted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
