VBA Code to save my excel 2013 file as Read Only (or Non Editable) ...

Hi,
ActiveWorkbook.SaveAs SFilePath & udds & ".xlsm", xlWorkbookNormal
SetAttr SFilePath & udds & ".xlsm", vbReadOnly
Application.DisplayAlerts = True
I have used the above code to make my file readonly ...however it still allows to make changes to the file and sometimes the file does not get open and throws an error " Excel cannot open the file ".xlsm" because the file format or file extension
is not valid......."
Could you please help me this
Regards, Hitesh

Hi,
ActiveWorkbook.SaveAs SFilePath & udds & ".xlsm", xlWorkbookNormal
SetAttr SFilePath & udds & ".xlsm", vbReadOnly
Application.DisplayAlerts = True
I have used the above code to make my file readonly ...however it still allows to make changes to the file and sometimes the file does not get open and throws an error " Excel cannot open the file ".xlsm" because the file format or file extension
is not valid......."
Could you please help me this
Regards, Hitesh
Saving the file as read-only does not mean you cannot make changes, it merely means it is recommended that you open this file as read-only. Also using 'xlWorkbookNormal' is incorrect since this is basically the macro-free xml format. Use the 'xlOpenXMLWorkbookMacroEnabled'
instead. Now as far as not allowing the user to make changes you will need to protect each worksheet, as well as protect the workbook. So something like
Sub ProtectWorkbook()
ThisWorkbook.Protect Structure:=True, Password:="test123"
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
sh.Protect Password:="Test1234"
Next sh
End Sub

Similar Messages

  • Programatically pick PowerView properties from Microsoft Excel 2013 file

    Hi,
    I have a requirement to programmatically read/handle PowerView properties like title, theme, background, font-size etc. from a Microsoft Excel 2013 file. Also I need to access the properties of the objects which are added on to the PowerView,
    for e.g. properties of a table or a image added to the PowerView.
    I have been looking for it since long, but no luck. Is there a way by which I can achieve it? Any pointers regarding this would be really helpful.
    Thanks in advance.

    Thanks Simon_Hou for the response.
    As per your answer, PowerView is an add-on and hence it is packaged and properties can't be picked.
    But, PowerPivot is also a com add-in still there exists a programming handle for it. We are able to pick several properties for PowerPivot using Interop.
    For PowerView, I am able to see certain bin files getting created but am unable to pick any information from those.
    (Bin files namely CustomProperties1.bin, CustomProperties2.bin, CustomProperties3.bin, CustomProperties4.bin, CustomProperties5.bin)
    Is there any way by which we can pick certain properties for Power View as well using these files or maybe some other way?

  • Can't save power pivot report back to power pivot gallery...file is read only

    Hi eb
    I have developed an excel pivot report in a power pivot gallery (all in 2013).
    Next time i open that report from the power pivot gallery and attempt to save it again to the gallery
    I am blocked with a msg: we cant save http://........./powerpivot gallery/myPwerPvt.xslx  file is read only.
    To keep your changes you'll need to save the woorkbook with a new name or different location.
    Please help!
    TIA
    Rea

    Hi Rea,
    When you try to edit the PowerPivot workbook, are you open it as read-only mode? Please see the screenshot below:
    The "Read Only" mode will not be able to save any changes to the workbook you are loading.
    In addition, is it work for you while you save the PowerPivot workbook with a new name?
    Regards,
    Elvis Long
    TechNet Community Support

  • MS Word: This file is read-only. To save a copy, click OK, and give the document a new name in the save dialog box.

    This is not a question. I believe I've found a new issue and the fix for it.
    The situation:
    A brand new iMac 27" running Yosemite 10.10.1
    MacMini server running 10.8.5 server.
    The issue:
    Client on iMac trying to work on MS Word documents stored on server was requiring him to save the documents to his desktop and then copy them back to the folder on the server. The exact error message was, "This file is read-only. To save a copy, click OK, and give the document a new name in the save dialog box."
    The issue is unique to this computer in an office of 10 client computers and three servers.
    Attempted fixes:
    Verified that the ".Temporaryitems" folder existed and the permissions were set properly.
    Repaired permissions on the client and the network share.
    Definitive fix:
    By default, Yosemite 10.10.1 uses SMB for connecting file shares. When I overrode the default and switched to AFP protocol, the issue went away.
    I hope this helps someone else.
    Rob

    That was it. What an operating system. It is very helpful to view files you are looking for. But if you have preview on you cannot save files.

  • Acrobat XI states file is read-only when trying to save

    For the last couple of weeks I have had this issue . . . when saving to our shared drive, Acrobat XI states file is read-only (pop-up below) and I must save as a different name or in a different folder.
    I must then save the file to a different folder or drive. No other Adobe product has this issue and it only occurs on our shared drive. IT states I have full permissions for the folder.
    Anybody else have this issue?

    I'm glad it was that easy, frankly! :-)
    Glad it solved the problem for you!
    Have a great day,
    Sara

  • Issue regarding open word file and read only mode using c# & MS-word interop

    i am programmatically open a word file for search and highlight keyword. my routine is working fine. the problem is when i am opening the file programmatically then a dialog come and ask me to open file in read only mode. the dialog look like below one
    actually i do not want to open the file in read only mode because people can open and like to change and save. so guide me what i can do to not to open the file in read only mode.
    here is my full code. just have a look and tell me what is wrong in my code or tell me any trick as a result i can open the file not in read only mode. here is my code.
    private void button1_Click(object sender, EventArgs e)
                object fileName = "";
                string filePath = "";
                string strSaveasPath = "";
                DialogResult result = openFileDialog1.ShowDialog();
                if (result == DialogResult.OK)
                    fileName = openFileDialog1.FileName;
                    //strSaveasPath = Path.GetDirectoryName(path.ToString());
                //fileName = "Z:\\C0000000003.doc";
                List<string> _list = new List<string>();
                _list.Add("tridip");
                _list.Add("arijit");
                //object fileName = "D:\\CVArchievePath\\C0000000001.doc";
                object textToFind = "test";
                object readOnly = false;
                Word.Application word = new Word.Application();
                Word.Document doc = new Word.Document();
                object missing = Type.Missing;
                try
                    doc = word.Documents.Open(ref fileName, ref missing, ref readOnly,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing);
                    doc.Activate();
                    object matchPhrase = false;
                    object matchCase = false;
                    object matchPrefix = false;
                    object matchSuffix = false;
                    object matchWholeWord = false;
                    object matchWildcards = false;
                    object matchSoundsLike = false;
                    object matchAllWordForms = false;
                    object matchByte = false;
                    object ignoreSpace = false;
                    object ignorePunct = false;
                    object highlightedColor = Word.WdColor.wdColorGreen;
                    object textColor = Word.WdColor.wdColorLightOrange;
                    object missingp = false;
                    Word.Range range = doc.Range();
                    foreach (string line in _list)
                        textToFind = line;
                        bool highlighted = range.Find.HitHighlight(ref textToFind,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing);
                    System.Diagnostics.Process.Start(fileName.ToString());
                catch (Exception ex)
                    Console.WriteLine("Error : " + ex.Message);
                    //Console.ReadKey(true);
                finally
                    //doc.Close(missing, missing, missing);
                    if(doc!=null)
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(doc);
                    if (word != null)
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(word);
                    word = null;
                    doc = null;
                    GC.Collect();
                    GC.WaitForPendingFinalizers();

    I know it's a very old issue and I reached to this page looking for a solution. Finally, I have found a fix to this problem.
    The problem is that we create an instance of Word and do not close it correctly. This makes program believe that the file is already open and hence you're getting the respective message of file being locked by you.
    Set the visibility of your application to true and then when you close it both file and instance should close and you will not get the problem again.

  • Opening the file in read only mode

    hi all,
    i am using
    i want to open any type of files in read only mode using host command.so first i am setting the attribute to read only and then opening the file. But still the opened file is editable. i have written like below
    Host( 'cmd /c  attrib +r "\test_folder\testing\PURCHASE_ORDER\'||:PO_FILE_NAME||'"',NO_SCREEN);
    Host( 'cmd /c "\test_folder\testing\PURCHASE_ORDER\'||:PO_FILE_NAME||'"',NO_SCREEN);is this is the way to open the file in readonly mode?
    Along with the above the files which i opened with the help of above said code those files i am not able to delete also.(i have to delete the selected file)
    i thing when i am setting the attribute something is going for a mess!
    Please help.
    Thanks..
    Edited by: GD on Jun 23, 2011 2:25 AM

    hi,
    Read only means you cannot mofiy the file. This also includes that you cannot delete a readonly-file yes,
    what i am doing is i have three button in my layout 'save','view' and 'delete'.
    1.so when user press 'save' button after selecting the file then the file gets saved into the specified.
    2. when user press 'view' button the file has to open in read only mode.
    for this i have written above mentioned code(but still i am able to edit the file)
    3.when user press 'delete' button the file has to be deleted from the specified location.
    so my problem is after setting file to read only mode, i am able to edit but i am not able to delete it.
    What i am using to set the file to read only mode is right?
    Please help.
    Thanks..

  • Every boot requires fsck. Makes file system read-only

    Suddenly when I booted my Arch I got a message saying that there was a corruption in my /home and /var directories. The same message suggested to pass fsck as solution. The booting process hanged there without entering to the emergency login. I took a live cd an executed a fsck in all my ext4 file system and “repaired” the problem.
    When I could log into the system if, for example, I want to write a file o do any operation (sudo for example) I get the message:
    sudo: unable to open /var/db/sudo/lola/0: Read-only file system
    If I reboot the PC again, the cycle begins again, this is: errors, asking for fsck, then, read-only FS.
    Some info that you may find useful:
    fstab
    /dev/sda3 / ext4 defaults 0 1
    /dev/sda5 /var ext4 defaults 0 1
    /dev/sda6 swap swap defaults 0 0
    /dev/sda7 /home ext4 defaults,user_xattr 0 1
    df -h
    Filesystem Size Used Avail Use% Mounted on
    rootfs 15G 7.2G 6.6G 52% /
    dev 1.9G 0 1.9G 0% /dev
    run 1.9G 740K 1.9G 1% /run
    /dev/sda3 15G 7.2G 6.6G 52% /
    tmpfs 1.9G 536K 1.9G 1% /dev/shm
    tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
    tmpfs 1.9G 80K 1.9G 1% /tmp
    /dev/sda7 80G 39G 37G 52% /home
    /dev/sda5 6.8G 3.7G 2.8G 58% /var
    /dev/sda2 358G 334G 25G 94% /media/windows
    systemctl
    UNIT LOAD ACTIVE SUB DESCRIPTION
    proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File System Au
    sys-devices-pci...000:00:1b.0-sound-card0.device loaded active plugged /sys/devices/pci0000:00/0000:00:1b.0/sound/card0
    sys-devices-pci...0-0000:02:00.0-net-eth0.device loaded active plugged /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.
    sys-devices-pci...-0000:03:00.0-net-wlan0.device loaded active plugged /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.
    sys-devices-pci...-1:0:0:0-block-sda-sda1.device loaded active plugged TOSHIBA_MK5055GSX
    sys-devices-pci...-1:0:0:0-block-sda-sda2.device loaded active plugged TOSHIBA_MK5055GSX
    sys-devices-pci...-1:0:0:0-block-sda-sda3.device loaded active plugged TOSHIBA_MK5055GSX
    sys-devices-pci...-1:0:0:0-block-sda-sda4.device loaded active plugged TOSHIBA_MK5055GSX
    sys-devices-pci...-1:0:0:0-block-sda-sda5.device loaded active plugged TOSHIBA_MK5055GSX
    sys-devices-pci...-1:0:0:0-block-sda-sda6.device loaded active plugged TOSHIBA_MK5055GSX
    sys-devices-pci...-1:0:0:0-block-sda-sda7.device loaded active plugged TOSHIBA_MK5055GSX
    sys-devices-pci...1:0:0-1:0:0:0-block-sda.device loaded active plugged TOSHIBA_MK5055GSX
    sys-devices-pci...5:0:0-5:0:0:0-block-sr0.device loaded active plugged TSSTcorp_CDDVDW_TS-L633C
    sys-devices-platform-serial8250-tty-ttyS0.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS0
    sys-devices-platform-serial8250-tty-ttyS1.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS1
    tail -100 /var/log/errors.log
    Jan 23 14:43:52 localhost kernel: [ 283.449542] ata2.00: error: { UNC }
    Jan 23 14:43:52 localhost kernel: [ 283.451224] end_request: I/O error, dev sda, sector 513442820
    Jan 23 14:43:52 localhost kernel: [ 283.451228] Buffer I/O error on device sda2, logical block 63796096
    Jan 23 14:43:56 localhost kernel: [ 287.394421] ata2.00: exception Emask 0x0 SAct 0xf SErr 0x0 action 0x0
    Jan 23 14:43:56 localhost kernel: [ 287.394426] ata2.00: irq_stat 0x40000001
    Jan 23 14:43:56 localhost kernel: [ 287.394430] ata2.00: failed command: READ FPDMA QUEUED
    Jan 23 14:43:56 localhost kernel: [ 287.394435] ata2.00: cmd 60/08:00:00:84:9a/00:00:1e:00:00/40 tag 0 ncq 4096 in
    Jan 23 14:43:56 localhost kernel: [ 287.394435] res 41/40:08:04:84:9a/00:00:1e:00:00/6e Emask 0x409 (media error) <F>
    Jan 23 14:43:56 localhost kernel: [ 287.394438] ata2.00: status: { DRDY ERR }
    Jan 23 14:43:56 localhost kernel: [ 287.394440] ata2.00: error: { UNC }
    Jan 23 14:43:56 localhost kernel: [ 287.394442] ata2.00: failed command: READ FPDMA QUEUED
    Jan 23 14:43:56 localhost kernel: [ 287.394447] ata2.00: cmd 60/00:08:1f:53:4d/01:00:2d:00:00/40 tag 1 ncq 131072 in
    Jan 23 14:43:56 localhost kernel: [ 287.394447] res 41/40:02:04:84:9a/00:00:1e:00:00/4e Emask 0x9 (media error)
    Jan 23 14:43:56 localhost kernel: [ 287.394449] ata2.00: status: { DRDY ERR }
    Jan 23 14:43:56 localhost kernel: [ 287.394451] ata2.00: error: { UNC }
    Jan 23 14:43:56 localhost kernel: [ 287.394453] ata2.00: failed command: WRITE FPDMA QUEUED
    Jan 23 14:43:56 localhost kernel: [ 287.394458] ata2.00: cmd 61/08:10:7f:6e:b7/00:00:30:00:00/40 tag 2 ncq 4096 out
    Jan 23 14:43:56 localhost kernel: [ 287.394458] res 41/40:02:04:84:9a/00:00:1e:00:00/4e Emask 0x9 (media error)
    Jan 23 14:43:56 localhost kernel: [ 287.394460] ata2.00: status: { DRDY ERR }
    Jan 23 14:43:56 localhost kernel: [ 287.394462] ata2.00: error: { UNC }
    Jan 23 14:43:56 localhost kernel: [ 287.394464] ata2.00: failed command: WRITE FPDMA QUEUED
    Jan 23 14:43:56 localhost kernel: [ 287.394468] ata2.00: cmd 61/90:18:37:42:31/00:00:35:00:00/40 tag 3 ncq 73728 out
    Jan 23 14:43:56 localhost kernel: [ 287.394468] res 41/40:02:04:84:9a/00:00:1e:00:00/4e Emask 0x9 (media error)
    Jan 23 14:43:56 localhost kernel: [ 287.394471] ata2.00: status: { DRDY ERR }
    Jan 23 14:43:56 localhost kernel: [ 287.394472] ata2.00: error: { UNC }
    Jan 23 14:43:56 localhost kernel: [ 287.396122] end_request: I/O error, dev sda, sector 513442820
    Jan 23 14:43:56 localhost kernel: [ 287.396125] Buffer I/O error on device sda2, logical block 63796096
    Jan 23 14:43:56 localhost kernel: [ 287.396179] end_request: I/O error, dev sda, sector 760042271
    Jan 23 14:43:56 localhost kernel: [ 287.396232] end_request: I/O error, dev sda, sector 817327743
    Jan 23 14:43:56 localhost kernel: [ 287.396235] Buffer I/O error on device sda7, logical block 1133175
    Jan 23 14:43:56 localhost kernel: [ 287.396282] end_request: I/O error, dev sda, sector 892420663
    Jan 23 14:44:01 localhost kernel: [ 291.317005] ata2.00: exception Emask 0x0 SAct 0x2 SErr 0x0 action 0x0
    Jan 23 14:44:01 localhost kernel: [ 291.317010] ata2.00: irq_stat 0x40000008
    Jan 23 14:44:01 localhost kernel: [ 291.317014] ata2.00: failed command: READ FPDMA QUEUED
    Jan 23 14:44:01 localhost kernel: [ 291.317019] ata2.00: cmd 60/08:08:00:84:9a/00:00:1e:00:00/40 tag 1 ncq 4096 in
    Jan 23 14:44:01 localhost kernel: [ 291.317019] res 41/40:08:04:84:9a/00:00:1e:00:00/6e Emask 0x409 (media error) <F>
    Jan 23 14:44:01 localhost kernel: [ 291.317022] ata2.00: status: { DRDY ERR }
    Jan 23 14:44:01 localhost kernel: [ 291.317024] ata2.00: error: { UNC }
    Jan 23 14:44:01 localhost kernel: [ 291.318643] end_request: I/O error, dev sda, sector 513442820
    Jan 23 14:44:01 localhost kernel: [ 291.318647] Buffer I/O error on device sda2, logical block 63796096
    Jan 23 14:44:01 localhost kernel: [ 291.546162] Aborting journal on device sda7-8.
    Jan 23 14:54:20 localhost [ 7.837917] systemd[1]: Socket service syslog.service not loaded, refusing.
    Jan 23 14:54:20 localhost [ 7.838515] systemd[1]: Failed to listen on Syslog Socket.
    Jan 23 14:54:21 localhost kernel: [ 10.930157] [drm:intel_panel_setup_backlight] *ERROR* Failed to get maximum backlight value
    Jan 23 14:54:34 localhost dhcpcd[564]: dhcpcd not running
    Jan 23 14:54:35 localhost dhcpcd[649]: dhcpcd not running
    Jan 23 14:54:35 localhost dhcpcd[662]: dhcpcd not running
    Jan 23 14:58:04 localhost su: pam_unix(su:auth): conversation failed
    Jan 23 17:00:38 localhost systemd[1]: Failed to start Netcfg multi-profile daemon.
    Jan 23 17:00:39 localhost [ 7.790297] systemd[1]: Socket service syslog.service not loaded, refusing.
    Jan 23 17:00:39 localhost [ 7.790891] systemd[1]: Failed to listen on Syslog Socket.
    Jan 23 17:00:39 localhost kernel: [ 11.363432] [drm:intel_panel_setup_backlight] *ERROR* Failed to get maximum backlight value
    Jan 23 17:00:55 localhost dhcpcd[612]: dhcpcd not running
    Jan 23 17:00:55 localhost dhcpcd[618]: dhcpcd not running
    Jan 23 17:00:55 localhost dhcpcd[626]: dhcpcd not running
    Jan 23 17:01:23 localhost su: pam_unix(su:auth): conversation failed
    Jan 23 17:04:55 localhost kernel: [ 274.346016] ata2.00: exception Emask 0x0 SAct 0xf SErr 0x0 action 0x0
    Jan 23 17:04:55 localhost kernel: [ 274.346022] ata2.00: irq_stat 0x40000008
    Jan 23 17:04:55 localhost kernel: [ 274.346025] ata2.00: failed command: READ FPDMA QUEUED
    Jan 23 17:04:55 localhost kernel: [ 274.346031] ata2.00: cmd 60/70:08:e8:83:9a/00:00:1e:00:00/40 tag 1 ncq 57344 in
    Jan 23 17:04:55 localhost kernel: [ 274.346031] res 41/40:70:04:84:9a/00:00:1e:00:00/6e Emask 0x409 (media error) <F>
    Jan 23 17:04:55 localhost kernel: [ 274.346034] ata2.00: status: { DRDY ERR }
    Jan 23 17:04:55 localhost kernel: [ 274.346035] ata2.00: error: { UNC }
    Jan 23 17:04:55 localhost kernel: [ 274.348151] end_request: I/O error, dev sda, sector 513442820
    Jan 23 17:04:55 localhost kernel: [ 274.348154] Buffer I/O error on device sda2, logical block 63796096
    Jan 23 17:04:55 localhost kernel: [ 274.348159] Buffer I/O error on device sda2, logical block 63796097
    Jan 23 17:04:55 localhost kernel: [ 274.348162] Buffer I/O error on device sda2, logical block 63796098
    Jan 23 17:04:55 localhost kernel: [ 274.348164] Buffer I/O error on device sda2, logical block 63796099
    Jan 23 17:04:55 localhost kernel: [ 274.348166] Buffer I/O error on device sda2, logical block 63796100
    Jan 23 17:04:55 localhost kernel: [ 274.348168] Buffer I/O error on device sda2, logical block 63796101
    Jan 23 17:04:55 localhost kernel: [ 274.348171] Buffer I/O error on device sda2, logical block 63796102
    Jan 23 17:04:55 localhost kernel: [ 274.348173] Buffer I/O error on device sda2, logical block 63796103
    Jan 23 17:04:55 localhost kernel: [ 274.348176] Buffer I/O error on device sda2, logical block 63796104
    Jan 23 17:04:55 localhost kernel: [ 274.348178] Buffer I/O error on device sda2, logical block 63796105
    Jan 23 17:04:59 localhost kernel: [ 278.257533] ata2.00: exception Emask 0x0 SAct 0x84 SErr 0x0 action 0x0
    Jan 23 17:04:59 localhost kernel: [ 278.257539] ata2.00: irq_stat 0x40000008
    Jan 23 17:04:59 localhost kernel: [ 278.257543] ata2.00: failed command: READ FPDMA QUEUED
    Jan 23 17:04:59 localhost kernel: [ 278.257549] ata2.00: cmd 60/08:38:00:84:9a/00:00:1e:00:00/40 tag 7 ncq 4096 in
    Jan 23 17:04:59 localhost kernel: [ 278.257549] res 41/40:08:04:84:9a/00:00:1e:00:00/6e Emask 0x409 (media error) <F>
    Jan 23 17:04:59 localhost kernel: [ 278.257551] ata2.00: status: { DRDY ERR }
    Jan 23 17:04:59 localhost kernel: [ 278.257553] ata2.00: error: { UNC }
    Jan 23 17:04:59 localhost kernel: [ 278.259233] end_request: I/O error, dev sda, sector 513442820
    Jan 23 17:05:03 localhost kernel: [ 282.157929] ata2.00: exception Emask 0x0 SAct 0x4 SErr 0x0 action 0x0
    Jan 23 17:05:03 localhost kernel: [ 282.157934] ata2.00: irq_stat 0x40000008
    Jan 23 17:05:03 localhost kernel: [ 282.157938] ata2.00: failed command: READ FPDMA QUEUED
    Jan 23 17:05:03 localhost kernel: [ 282.157943] ata2.00: cmd 60/08:10:00:84:9a/00:00:1e:00:00/40 tag 2 ncq 4096 in
    Jan 23 17:05:03 localhost kernel: [ 282.157943] res 41/40:08:04:84:9a/00:00:1e:00:00/6e Emask 0x409 (media error) <F>
    Jan 23 17:05:03 localhost kernel: [ 282.157946] ata2.00: status: { DRDY ERR }
    Jan 23 17:05:03 localhost kernel: [ 282.157947] ata2.00: error: { UNC }
    Jan 23 17:05:03 localhost kernel: [ 282.159582] end_request: I/O error, dev sda, sector 513442820
    Jan 23 17:05:03 localhost kernel: [ 282.159588] Buffer I/O error on device sda2, logical block 63796096
    Jan 23 17:05:07 localhost kernel: [ 286.069482] ata2.00: exception Emask 0x0 SAct 0x40 SErr 0x0 action 0x0
    Jan 23 17:05:07 localhost kernel: [ 286.069487] ata2.00: irq_stat 0x40000008
    Jan 23 17:05:07 localhost kernel: [ 286.069491] ata2.00: failed command: READ FPDMA QUEUED
    Jan 23 17:05:07 localhost kernel: [ 286.069496] ata2.00: cmd 60/08:30:00:84:9a/00:00:1e:00:00/40 tag 6 ncq 4096 in
    Jan 23 17:05:07 localhost kernel: [ 286.069496] res 41/40:08:04:84:9a/00:00:1e:00:00/6e Emask 0x409 (media error) <F>
    Jan 23 17:05:07 localhost kernel: [ 286.069499] ata2.00: status: { DRDY ERR }
    Jan 23 17:05:07 localhost kernel: [ 286.069501] ata2.00: error: { UNC }
    Jan 23 17:05:07 localhost kernel: [ 286.071955] end_request: I/O error, dev sda, sector 513442820
    Jan 23 17:05:07 localhost kernel: [ 286.071959] Buffer I/O error on device sda2, logical block 63796096
    Waiting for your help.
    Thank you.

    oh god, if my HD dies I will kill myself.
    I did the SMART, short and long (following the ArchWiki) and got (will post the long as soon it ends):
    === START OF READ SMART DATA SECTION ===
    SMART Self-test log structure revision number 1
    Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
    # 1 Short offline Completed without error 00% 7967 -
    With more details:
    smartctl -a /dev/sda
    smartctl 6.0 2012-10-10 r3643 [x86_64-linux-3.6.9-1-ARCH] (local build)
    Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org
    === START OF INFORMATION SECTION ===
    Model Family: Toshiba 2.5" HDD MK..55GSX
    Device Model: TOSHIBA MK5055GSX
    Serial Number: 897JC07RT
    LU WWN Device Id: 5 000039 1f3c01f05
    Firmware Version: FG001M
    User Capacity: 500,107,862,016 bytes [500 GB]
    Sector Size: 512 bytes logical/physical
    Device is: In smartctl database [for details use: -P show]
    ATA Version is: ATA8-ACS (minor revision not indicated)
    SATA Version is: SATA 2.6, 3.0 Gb/s
    Local Time is: Wed Jan 23 13:46:24 2013 PYST
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    General SMART Values:
    Offline data collection status: (0x00) Offline data collection activity
    was never started.
    Auto Offline Data Collection: Disabled.
    Self-test execution status: ( 249) Self-test routine in progress...
    90% of test remaining.
    Total time to complete Offline
    data collection: ( 120) seconds.
    Offline data collection
    capabilities: (0x5b) SMART execute Offline immediate.
    Auto Offline data collection on/off support.
    Suspend Offline collection upon new
    command.
    Offline surface scan supported.
    Self-test supported.
    No Conveyance Self-test supported.
    Selective Self-test supported.
    SMART capabilities: (0x0003) Saves SMART data before entering
    power-saving mode.
    Supports SMART auto save timer.
    Error logging capability: (0x01) Error logging supported.
    General Purpose Logging supported.
    Short self-test routine
    recommended polling time: ( 2) minutes.
    Extended self-test routine
    recommended polling time: ( 183) minutes.
    SCT capabilities: (0x0039) SCT Status supported.
    SCT Error Recovery Control supported.
    SCT Feature Control supported.
    SCT Data Table supported.
    SMART Attributes Data Structure revision number: 16
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
    1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
    2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
    3 Spin_Up_Time 0x0027 100 100 001 Pre-fail Always - 1320
    4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 1807
    5 Reallocated_Sector_Ct 0x0033 100 100 050 Pre-fail Always - 7
    7 Seek_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
    8 Seek_Time_Performance 0x0005 100 100 050 Pre-fail Offline - 0
    9 Power_On_Hours 0x0032 081 081 000 Old_age Always - 7967
    10 Spin_Retry_Count 0x0033 136 100 030 Pre-fail Always - 0
    12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 1789
    191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 97
    192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 33
    193 Load_Cycle_Count 0x0032 082 082 000 Old_age Always - 189405
    194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 39 (Min/Max 9/50)
    196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 1
    197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 9
    198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0
    199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
    220 Disk_Shift 0x0002 100 100 000 Old_age Always - 87
    222 Loaded_Hours 0x0032 085 085 000 Old_age Always - 6001
    223 Load_Retry_Count 0x0032 100 100 000 Old_age Always - 0
    224 Load_Friction 0x0022 100 100 000 Old_age Always - 0
    226 Load-in_Time 0x0026 100 100 000 Old_age Always - 320
    240 Head_Flying_Hours 0x0001 100 100 001 Pre-fail Offline - 0
    SMART Error Log Version: 1
    ATA Error Count: 634 (device log contains only the most recent five errors)
    CR = Command Register [HEX]
    FR = Features Register [HEX]
    SC = Sector Count Register [HEX]
    SN = Sector Number Register [HEX]
    CL = Cylinder Low Register [HEX]
    CH = Cylinder High Register [HEX]
    DH = Device/Head Register [HEX]
    DC = Device Command Register [HEX]
    ER = Error register [HEX]
    ST = Status register [HEX]
    Powered_Up_Time is measured from power on, and printed as
    DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
    SS=sec, and sss=millisec. It "wraps" after 49.710 days.
    Error 634 occurred at disk power-on lifetime: 7967 hours (331 days + 23 hours)
    When the command that caused the error occurred, the device was active or idle.
    After command completion occurred, registers were:
    ER ST SC SN CL CH DH
    40 41 02 04 84 9a 6e Error: UNC at LBA = 0x0e9a8404 = 245007364
    Commands leading to the command that caused the error were:
    CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
    60 08 00 00 84 9a 40 08 03:31:25.735 READ FPDMA QUEUED
    ea 00 00 00 00 00 a0 00 03:31:25.714 FLUSH CACHE EXT
    61 18 08 07 82 b1 40 08 03:31:25.714 WRITE FPDMA QUEUED
    61 08 00 0f 7d 31 40 08 03:31:25.714 WRITE FPDMA QUEUED
    ea 00 00 00 00 00 a0 00 03:31:25.682 FLUSH CACHE EXT
    Error 633 occurred at disk power-on lifetime: 7967 hours (331 days + 23 hours)
    When the command that caused the error occurred, the device was active or idle.
    After command completion occurred, registers were:
    ER ST SC SN CL CH DH
    40 41 02 04 84 9a 6e Error: UNC at LBA = 0x0e9a8404 = 245007364
    Commands leading to the command that caused the error were:
    CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
    60 08 00 00 84 9a 40 08 03:31:21.832 READ FPDMA QUEUED
    61 18 00 27 81 b1 40 08 03:31:21.451 WRITE FPDMA QUEUED
    61 18 00 27 77 b1 40 08 03:31:20.425 WRITE FPDMA QUEUED
    61 18 00 2f 8c b1 40 08 03:31:19.451 WRITE FPDMA QUEUED
    61 18 00 ef 81 b1 40 08 03:31:18.445 WRITE FPDMA QUEUED
    Error 632 occurred at disk power-on lifetime: 7967 hours (331 days + 23 hours)
    When the command that caused the error occurred, the device was active or idle.
    After command completion occurred, registers were:
    ER ST SC SN CL CH DH
    40 41 0a 04 84 9a 6e Error: UNC at LBA = 0x0e9a8404 = 245007364
    Commands leading to the command that caused the error were:
    CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
    60 00 00 07 7f 09 40 08 03:16:43.581 READ FPDMA QUEUED
    60 08 08 00 84 9a 40 08 03:16:43.559 READ FPDMA QUEUED
    60 00 00 a7 5b 09 40 08 03:16:43.552 READ FPDMA QUEUED
    ef 10 02 00 00 00 a0 00 03:16:43.551 SET FEATURES [Reserved for Serial ATA]
    27 00 00 00 00 00 e0 00 03:16:43.551 READ NATIVE MAX ADDRESS EXT
    Error 631 occurred at disk power-on lifetime: 7967 hours (331 days + 23 hours)
    When the command that caused the error occurred, the device was active or idle.
    After command completion occurred, registers were:
    ER ST SC SN CL CH DH
    40 41 0a 04 84 9a 6e Error: UNC at LBA = 0x0e9a8404 = 245007364
    Commands leading to the command that caused the error were:
    CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
    60 00 00 a7 5b 09 40 08 03:16:39.713 READ FPDMA QUEUED
    60 08 00 87 b5 25 40 08 03:16:39.705 READ FPDMA QUEUED
    60 00 00 8f 60 05 40 08 03:16:39.693 READ FPDMA QUEUED
    60 08 00 e7 d4 54 40 08 03:16:39.692 READ FPDMA QUEUED
    60 08 08 00 84 9a 40 08 03:16:39.678 READ FPDMA QUEUED
    Error 630 occurred at disk power-on lifetime: 7967 hours (331 days + 23 hours)
    When the command that caused the error occurred, the device was active or idle.
    After command completion occurred, registers were:
    ER ST SC SN CL CH DH
    40 41 12 04 84 9a 6e Error: WP at LBA = 0x0e9a8404 = 245007364
    Commands leading to the command that caused the error were:
    CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
    61 08 08 0e 4c b6 40 08 03:16:35.710 WRITE FPDMA QUEUED
    61 08 08 0e 4c b6 40 08 03:16:35.710 WRITE FPDMA QUEUED
    61 08 08 0e 4c b6 40 08 03:16:35.709 WRITE FPDMA QUEUED
    61 98 18 8f 41 31 40 08 03:16:35.709 WRITE FPDMA QUEUED
    61 08 08 0e 4c b6 40 08 03:16:35.708 WRITE FPDMA QUEUED
    SMART Self-test log structure revision number 1
    Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
    # 1 Short offline Completed without error 00% 7967 -
    SMART Selective self-test log data structure revision number 1
    SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
    1 0 0 Not_testing
    2 0 0 Not_testing
    3 0 0 Not_testing
    4 0 0 Not_testing
    5 0 0 Not_testing
    Selective self-test flags (0x0):
    After scanning selected spans, do NOT read-scan remainder of disk.
    If Selective self-test is pending on power-up, resume after 0 minute delay.
    Is there an equivalent to Solaris iostat -En in Linux? Havent found any. Remember that I can't install anything: read-only FS
    Last edited by gromlok (2013-01-23 16:47:35)

  • I am not able to use Firefox with Sharepoint - I can only open a file in read-only mode and cannot checkout the document and edit.

    I would like to use Firefox with Sharepoint.
    However, I am only able to open a file in "read only" mode whch means I cannot edit the document and save it. I am also not able to "check-out" a document in Sharepoint and edit it at the same time.

    This may not work for everyone, but I solved this problem by clicking on the file name in sharepoint, not the document icon to the left of the name. This then brought up the various options, including checking out, editing, version history etc. It seems obvious but I have only just realised this!

  • File as Read Only

    Hello,
    When I am opening any file (DTR -> Edit ->) in NWDS, it' gets opened as Read only. I am unable to make any changes in it. Can anyone help?
    Regards,
    Shaun

    Hi Pavan,
    Yes. I have done this.
    We download code from Development server to our local systems. NOw we have observed that on any system if we download the code, files becomes read-only. What can be the problem? It's definetly not a local system problem.
    Regards,
    Shaun

  • CU upgrade error; [ERROR] Save() is not supported on a read-only object.

    Hi All,
    When we try to update or Exchange 2013 CU3 environment to CU7 we get some errors when we try to prepare ad.
    It fails at 98% with an error:
    [2] [ERROR] Save() is not supported on a read-only object.
    [2] [WARNING] An unexpected error has occurred and a Watson dump is being generated: Save() is not supported on a read-only object.
    We have checked all the security settings with our test environment where it is working. Running command prompt as an admin and we have all necessary domain rights. Also checked alle the objects with Adsi edit, but no difference with our test environment.
    Exchange error log:
    [03/18/2015 20:17:47.0096] [2] Used domain controller <FQDN> to read object CN=Exchange Servers,OU=Microsoft Exchange Security Groups,DC=prod,DC=local.
    [03/18/2015 20:17:47.0096] [2] Used domain controller <FQDN> to read object CN=Exchange Servers,OU=Microsoft Exchange Security Groups,DC=prod,DC=local.
    [03/18/2015 20:17:47.0096] [2] [ERROR] Save() is not supported on a read-only object.
    [03/18/2015 20:17:47.0096] [2] [WARNING] An unexpected error has occurred and a Watson dump is being generated: Save() is not supported on a read-only object.
    [03/18/2015 20:17:47.0962] [1] The following 1 error(s) occurred during task execution:
    [03/18/2015 20:17:47.0962] [1] 0.  ErrorRecord: Save() is not supported on a read-only object.
    [03/18/2015 20:17:47.0962] [1] 0.  ErrorRecord: System.InvalidOperationException: Save() is not supported on a read-only object.
       at Microsoft.Exchange.Data.Directory.ADDataSession.Save(ADObject instanceToSave, IEnumerable`1 properties, Boolean bypassValidation)
       at Microsoft.Exchange.Management.Tasks.InitializeDomainPermissions.InternalProcessRecord()
       at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__8()
       at Microsoft.Exchange.Configuration.Core.LatencyTrackerExtension.StartAndEndInternalTracking(LatencyTracker latencyTracker, String groupName, String funcName, Boolean logDetailsAlways, Action action)
       at Microsoft.Exchange.Configuration.Core.CmdletLatencyTracker.StartAndEndInternalTracking(Guid cmdletUniqueId, String groupName, String funcName, Boolean logDetailsAlways, Action action)
       at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__7()
       at Microsoft.Exchange.Configuration.Core.LatencyTrackerExtension.StartAndEndInternalTracking(LatencyTracker latencyTracker, String groupName, String funcName, Boolean logDetailsAlways, Action action)
       at Microsoft.Exchange.Configuration.Core.CmdletLatencyTracker.StartAndEndInternalTracking(Guid cmdletUniqueId, String groupName, String funcName, Boolean logDetailsAlways, Action action)
       at Microsoft.Exchange.Configuration.Tasks.Task.ProcessRecord()
       at System.Management.Automation.CommandProcessor.ProcessRecord()
    Thanks!
    Regards, Raymond

    Hello,
    Please check the current schema version:
    https://support.microsoft.com/en-us/kb/558112?wa=wsignin1.0
    Try updating the schema by the following command:
    Setup.exe /PrepareSchema
    https://technet.microsoft.com/en-us/library/bb125224(v=exchg.150).aspx
    Thanks,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Simon Wu
    TechNet Community Support

  • Upload data to excel sheet- make columns read only

    I would like to upload my internal table data-10 columns into excel sheet.
    I know how to upload my data into excel sheet.
    I want 2 of the columns in excel sheet to be read only out of the 10 columns.
    Is there any way that i can control the properties of excel sheet from SAP.
    Thanks in advance

    done

  • How do yo turn a pdf file into reader so i can edit the form?

    how do yo turn a pdf file into reader so i can edit the form?

    I have no idea what you are trying to say; your are trying to open a PDF with Reader?

  • Problems with file permissions (read only) from Migration Assistant

    So, I just got a new computer (Mac Pro / Leopard) and I used the Migration Assistant to bring in all of my information from my old Powerbook running Tiger. Once that was done I had two accounts: my old admin account (with all of my settings) and my new admin account (the default). I deleted the new admin account because I had no intent to use it any longer, and planned to continue using the old one.
    But since then, I have been having some permissions issues. Pretty much all of my files are Read Only, so I have to set the permissions on them one-by-one as I need to write them. This also prevented me from doing the 10.5.2 update in Software Update (I was able to get it manually from apple.com.
    I need to know if there's any way to fix this. I tried restoring from the discs, but that didn't affect anything. I've tried repairing permissions, and while that may have helped with some system folders, it doesn't help with the rest of the hundreds of files that I'm sure I'll need to "unlock" in the future.
    Please help!

    Repairing permissions won't fix this. Repair permissions can only work on system files and other files which have a bill of materials (BOM) receipt in /Library/Receipts.
    You need to change the ownership of the files. This is very easy to do with terminal if you know what you're doing:
    sudo chown -R username:staff
    where username is your short username (e.g. mine is blloyd).

  • Cannot able to save Excel 2013 file in Sharepoint 2007 document library

    Dear All,
    We have SharePoint 2007 intranet portal where in we have teamplace created for internal users to collaborate on documents.
    Now we are having issues when using uploads Excel 2013 or Excel 2010 file on document library and try to edit the document.
    Sometimes it doesn't allow to check out the file it say someone already checked out ..but when I try in my laptop its OK.
    And some times when user opens the file it opens as non editable file and it does not take any changes.
    Pls advise whether there is issue with SharePoint 2007 document library and Office Excel 2010,2013 files.
    -- Regards Sandeep

    The lock can apply in two places.  Are you seeing the message in your browser or does it arise within Excel itself?
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

Maybe you are looking for