Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Software] Apparent Directory Corruption

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
asharris
Posts: 3
Joined: 2024-03-21 14:42

[Software] Apparent Directory Corruption

#1 Post by asharris »

As a normal user I copied some files to a directory (/var/www/rfq-include/tpl) but the files were not able to be opened PHP through apache.

The folder shows as:

Code: Select all

root@debian-gnu-linux-12:/var/www/rfq-include# ls -ld tpl
drwxrwxrw- 3 tony tony 4096 Mar 21 11:27 tpl
root@debian-gnu-linux-12:/var/www/rfq-include#
The files therein list as follows:

Code: Select all

root@debian-gnu-linux-12:/var/www/rfq-include# ls -l tpl
total 120
-rw-rw-rw- 1 tony tony 1028 Mar 21 11:27  acceptedrfq.tpl
-rw-rw-rw- 1 tony tony 1055 Mar 21 11:27 'authsupplier (Jayden Spring'\''s conflicted copy 2014-06-16).tpl'
-rw-rw-rw- 1 tony tony 2257 Mar 21 11:27  authsupplier.tpl
-rw-rw-rw- 1 tony tony 3027 Mar 21 11:27  billing.tpl
-rw-rw-rw- 1 tony tony 4269 Mar 21 11:27  clientsupp.tpl
-rw-rw-rw- 1 tony tony 2027 Mar 21 11:27  error.tpl
-rw-rw-rw- 1 tony tony 2990 Mar 21 11:27  footer.tpl
-rw-rw-rw- 1 tony tony 1384 Mar 21 11:27  form.tpl
-rw-rw-rw- 1 tony tony 3977 Mar 21 11:27  header.tpl
-rw-rw-rw- 1 tony tony 1531 Mar 21 11:27  invites.tpl
-rw-rw-rw- 1 tony tony  326 Mar 21 11:27  login.tpl
-rw-rw-rw- 1 tony tony  564 Mar 21 11:27  log.tpl
-rw-rw-rw- 1 tony tony 9343 Mar 21 11:27  longform1.tpl
-rw-rw-rw- 1 tony tony 7419 Mar 21 11:27  longform.tpl
-rw-rw-rw- 1 tony tony 1301 Mar 21 11:27  main.tpl
-rw-rw-rw- 1 tony tony 1639 Mar 21 11:27  manageaddress.tpl
-rw-rw-rw- 1 tony tony 1800 Mar 21 11:27  menu.tpl
-rw-rw-rw- 1 tony tony  401 Mar 21 11:27  message.tpl
-rw-rw-rw- 1 tony tony   93 Mar 21 11:27  start
drwxrwxrw- 2 tony tony 4096 Mar 21 11:27  subcontent
-rw-rw-rw- 1 tony tony 1391 Mar 21 11:27  suplist.tpl
-rw-rw-rw- 1 tony tony 1199 Mar 21 11:27  supplierauth.tpl
-rw-rw-rw- 1 tony tony  295 Mar 21 11:27  table.tpl
-rw-rw-rw- 1 tony tony 6198 Mar 21 11:27  testLeftNav.tpl
-rw-rw-rw- 1 tony tony 1364 Mar 21 11:27  thickboxform.tpl
root@debian-gnu-linux-12:/var/www/rfq-include#
The listing is exactly the same if I am running as myself (tony)

To be able to see what was happing as the Apache user, I edited /etc/passwd so that I could su to user 'www-data'.

As user 'www-data' the file listings look like:

Code: Select all

www-data@debian-gnu-linux-12:~/rfq-include$ ls -ld tpl
drwxrwxrw- 3 tony tony 4096 Mar 21 11:27 tpl
www-data@debian-gnu-linux-12:~/rfq-include$
Which looks fine, but listing the folder contents gives:

Code: Select all

www-data@debian-gnu-linux-12:~/rfq-include$ ls -l tpl
ls: cannot access 'tpl/authsupplier.tpl': Permission denied
ls: cannot access 'tpl/error.tpl': Permission denied
ls: cannot access 'tpl/menu.tpl': Permission denied
ls: cannot access 'tpl/footer.tpl': Permission denied
ls: cannot access 'tpl/longform.tpl': Permission denied
ls: cannot access 'tpl/thickboxform.tpl': Permission denied
ls: cannot access 'tpl/message.tpl': Permission denied
ls: cannot access 'tpl/start': Permission denied
ls: cannot access 'tpl/suplist.tpl': Permission denied
ls: cannot access 'tpl/billing.tpl': Permission denied
ls: cannot access 'tpl/log.tpl': Permission denied
ls: cannot access 'tpl/form.tpl': Permission denied
ls: cannot access 'tpl/authsupplier (Jayden Spring'\''s conflicted copy 2014-06-16).tpl': Permission denied
ls: cannot access 'tpl/header.tpl': Permission denied
ls: cannot access 'tpl/table.tpl': Permission denied
ls: cannot access 'tpl/main.tpl': Permission denied
ls: cannot access 'tpl/testLeftNav.tpl': Permission denied
ls: cannot access 'tpl/acceptedrfq.tpl': Permission denied
ls: cannot access 'tpl/clientsupp.tpl': Permission denied
ls: cannot access 'tpl/invites.tpl': Permission denied
ls: cannot access 'tpl/manageaddress.tpl': Permission denied
ls: cannot access 'tpl/longform1.tpl': Permission denied
ls: cannot access 'tpl/subcontent': Permission denied
ls: cannot access 'tpl/login.tpl': Permission denied
ls: cannot access 'tpl/supplierauth.tpl': Permission denied
total 0
-????????? ? ? ? ?            ?  acceptedrfq.tpl
-????????? ? ? ? ?            ? 'authsupplier (Jayden Spring'\''s conflicted copy 2014-06-16).tpl'
-????????? ? ? ? ?            ?  authsupplier.tpl
-????????? ? ? ? ?            ?  billing.tpl
-????????? ? ? ? ?            ?  clientsupp.tpl
-????????? ? ? ? ?            ?  error.tpl
-????????? ? ? ? ?            ?  footer.tpl
-????????? ? ? ? ?            ?  form.tpl
-????????? ? ? ? ?            ?  header.tpl
-????????? ? ? ? ?            ?  invites.tpl
-????????? ? ? ? ?            ?  login.tpl
-????????? ? ? ? ?            ?  log.tpl
-????????? ? ? ? ?            ?  longform1.tpl
-????????? ? ? ? ?            ?  longform.tpl
-????????? ? ? ? ?            ?  main.tpl
-????????? ? ? ? ?            ?  manageaddress.tpl
-????????? ? ? ? ?            ?  menu.tpl
-????????? ? ? ? ?            ?  message.tpl
-????????? ? ? ? ?            ?  start
d????????? ? ? ? ?            ?  subcontent
-????????? ? ? ? ?            ?  suplist.tpl
-????????? ? ? ? ?            ?  supplierauth.tpl
-????????? ? ? ? ?            ?  table.tpl
-????????? ? ? ? ?            ?  testLeftNav.tpl
-????????? ? ? ? ?            ?  thickboxform.tpl
www-data@debian-gnu-linux-12:~/rfq-include$
I have seen the exact same corruption when I have copied files to an NFS mounted drive.

I am running:

Code: Select all

Linux debian-gnu-linux-12 6.1.0-18-arm64 #1 SMP Debian 6.1.76-1 (2024-02-01) aarch64 GNU/Linux
Can anyone explain what is happening?

Antony

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: [Software] Apparent Directory Corruption

#2 Post by dilberts_left_nut »

The 'tpl' directory needs 'execute' permission ('list' for dirs) for world.

The listing is the listing.
It doesn't change depending on who you are.
AdrianTM wrote:There's no hacker in my grandma...

asharris
Posts: 3
Joined: 2024-03-21 14:42

Re: [Software] Apparent Directory Corruption

#3 Post by asharris »

The tpl directory already has execute permission for everyone. In my original post:

Code: Select all

root@debian-gnu-linux-12:/var/www/rfq-include# ls -ld tpl
drwxrwxrw- 3 tony tony 4096 Mar 21 11:27 tpl
root@debian-gnu-linux-12:/var/www/rfq-include#

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: [Software] Apparent Directory Corruption

#4 Post by dilberts_left_nut »

Look closer.
AdrianTM wrote:There's no hacker in my grandma...

asharris
Posts: 3
Joined: 2024-03-21 14:42

Re: [Software] Apparent Directory Corruption

#5 Post by asharris »

My OLD eyes!

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: [Software] Apparent Directory Corruption

#6 Post by dilberts_left_nut »

;)
AdrianTM wrote:There's no hacker in my grandma...

Post Reply