Modify

Opened 3 years ago

Last modified 23 months ago

#19432 reopened defect

trunk - unable to rename files

Reported by: James W Owned by: nbd
Priority: normal Milestone: Chaos Calmer 15.05
Component: kernel Version: Trunk
Keywords: busybox mv rename Cc: james.wood@…

Description

In current trunk (45277) I am unable to rename files on the file system once installed on the router.

I am testing with:

http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/openwrt-ar71xx-generic-gl-inet-6416A-v1-squashfs-sysupgrade.bin

This is strange, as I can copy, edit, create and delete files, just not rename.

Commands to replicate:

cd /etc
mv firewall.user fw.user
can't rename 'firewall.user': Invalid argument

strace output:

http://www.pastebin.com/x4CNKmLu

This is a plain install from openwrt trunk build, with only the strace package added.

Thanks,

James

Attachments (0)

Change History (14)

comment:1 Changed 3 years ago by kaloz

  • Component changed from base system to kernel
  • Milestone set to Chaos Calmer (trunk)
  • Owner changed from developers to nbd
  • Status changed from new to assigned

comment:2 Changed 3 years ago by James W

Just tested on today's trunk and still the same. Seems strange. If you create a new file (or copy an existing one) you can rename it ok, and you can rename stuff in /tmp also... but not anywhere else or existing files on the FS.

comment:3 Changed 3 years ago by nbd

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in r45362

comment:4 Changed 3 years ago by anonymous

root@OpenWrt:/etc# rm -rf dropbear/
rm: can't remove 'dropbear': Invalid argument

still not remove dir

comment:5 Changed 3 years ago by nbd

did you clean your kernel tree after updating?

comment:6 Changed 3 years ago by James W

Hi

This is partially resolved with your commit in r45362 however you can only rename a file, not a directory. Also, if you try and rename a file back to the original name, it does not let you, giving the same "Invalid argument". Steps to replicate:

cd /etc/
mv firewall.user fw.user (works ok)
mv fw.user firewall.user (invalid argument trying to rename back)
mv comgt/ comgt2/ (invalid argument on folder rename)

Thanks

James

comment:7 Changed 3 years ago by James W

Hi nbd

Is there any update/fix possible for this? That would be most appreciated.

If you require any further info/testing just let me know.

Thanks

James

comment:8 Changed 3 years ago by bittorf@…

it was fixed in r45580 - please try

comment:9 Changed 3 years ago by James W

This works great now, thanks to everyone involved in the fix!

comment:10 Changed 2 years ago by Lantis

  • Resolution fixed deleted
  • Status changed from closed to reopened

Seeing this issue again on CC 47615 on a wrt1900ac.

comment:11 Changed 2 years ago by chris5560

Hi, is there a fix/backport available for 15.05 Release (r46767) ?
I just downloaded factory image for WNDR4300 from downloads
and I also build my own on a reloaded build tree(r48140).
Both not working.

comment:12 follow-up: Changed 2 years ago by iancd

Seeing this with fresh r48259 on a WRT1200ac

root@OpenWrt ~# mv /etc/collectd.conf /etc/collectd.conf.bak
mv: can't rename '/etc/collectd.conf': Invalid argument

comment:13 in reply to: ↑ 12 ; follow-up: Changed 2 years ago by bittorf@…

Replying to iancd:

Seeing this with fresh r48259 on a WRT1200ac

root@OpenWrt ~# mv /etc/collectd.conf /etc/collectd.conf.bak
mv: can't rename '/etc/collectd.conf': Invalid argument

please show 'cat /proc/mounts'

comment:14 in reply to: ↑ 13 Changed 23 months ago by karfam

Replying to bittorf@…:

Replying to iancd:

Seeing this with fresh r48259 on a WRT1200ac

root@OpenWrt ~# mv /etc/collectd.conf /etc/collectd.conf.bak
mv: can't rename '/etc/collectd.conf': Invalid argument

please show 'cat /proc/mounts'

have the same problem with wrt1200ac

/dev/root /rom squashfs ro,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0
/dev/ubi0_1 /overlay ubifs rw,noatime 0 0
overlayfs:/overlay / overlay rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0 0
ubi1:syscfg /tmp/syscfg ubifs rw,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,size=512k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600 0 0
/dev/sda1 /mnt/sda1 ext4 rw,relatime,data=ordered 0 0
/dev/sda3 /mnt/sda3 ext4 rw,relatime,block_validity,delalloc,barrier,user_xattr 0 0
debugfs /sys/kernel/debug debugfs rw,noatime 0 0
/dev/mtdblock7 /mnt/mtdblock7 jffs2 rw,relatime 0 0
/dev/ubi1_0 /mnt/ubi1_0 ubifs rw,relatime 0 0

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.